Search Results

Search found 386 results on 16 pages for 'qt4'.

Page 1/16 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Qt Linking Error.

    - by Wallah
    Hi, I configure qt-x11 with following options ./configure -prefix /iTalk/qtx11 -prefix-install -bindir /iTalk/qtx11-install/bin -libdir /iTalk/qtx11-install/lib -docdir /iTalk/qtx11-install/doc -headerdir /iTalk/qtx11-install/include -datadir /iTalk/qtx11-install/data -examplesdir /iTalk/qtx11-install/examples -demosdir /iTalk/qtx11-install/demos -debug. Now I am getting following errors in Fedora Core 6. Can you please tell me where the problem is? obj/debug-shared/qapplication_x11.o: In function `qt_init(QApplicationPrivate*, int, _XDisplay*, unsigned long, unsigned long)': /iTalk/QT4/qt/src/gui/kernel/qapplication_x11.cpp:1713: undefined reference to `FcInit' .obj/debug-shared/qfontdatabase.o: In function `queryFont': /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1727: undefined reference to `FcFreeTypeQuery' .obj/debug-shared/qfontdatabase.o: In function `registerFont': /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1959: undefined reference to `FcConfigGetCurrent' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1963: undefined reference to `FcConfigGetFonts' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1965: undefined reference to `FcConfigAppFontAddFile' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1966: undefined reference to `FcConfigGetFonts' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1985: undefined reference to `FcConfigGetBlanks' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1997: undefined reference to `FcPatternDel' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1998: undefined reference to `FcPatternAddString' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:2001: undefined reference to `FcPatternGetString' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:2006: undefined reference to `FcFontSetAdd' .obj/debug-shared/qfontdatabase.o: In function `qt_FcPatternToQFontDef(_FcPattern*, QFontDef const&)': /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:746: undefined reference to `FcPatternGetString' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:751: undefined reference to `FcPatternGetDouble' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:759: undefined reference to `FcPatternGetDouble' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:771: undefined reference to `FcPatternGetInteger' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:776: undefined reference to `FcPatternGetInteger' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:786: undefined reference to `FcPatternGetBool' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:793: undefined reference to `FcPatternGetInteger' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:800: undefined reference to `FcPatternGetInteger' .obj/debug-shared/qfontdatabase.o: In function `FcFontSetRemove': /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1573: undefined reference to `FcPatternDestroy' .obj/debug-shared/qfontdatabase.o: In function `qt_fontSetForPattern(_FcPattern*, QFontDef const&)': /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1657: undefined reference to `FcFontSort' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1671: undefined reference to `FcPatternGetBool' .obj/debug-shared/qfontdatabase.o: In function `qt_addPatternProps(_FcPattern*, int, int, QFontDef const&)': /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1449: undefined reference to `FcPatternAddInteger' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1456: undefined reference to `FcPatternAddInteger' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1459: undefined reference to `FcPatternAddDouble' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1464: undefined reference to `FcPatternAddInteger' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1468: undefined reference to `FcPatternAddBool' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1471: undefined reference to `FcPatternAddBool' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1476: undefined reference to `FcLangSetCreate' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1477: undefined reference to `FcLangSetAdd' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1478: undefined reference to `FcPatternAddLangSet' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1479: undefined reference to `FcLangSetDestroy' .obj/debug-shared/qfontdatabase.o: In function `tryPatternLoad': /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1588: undefined reference to `FcPatternDuplicate' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1593: undefined reference to `FcConfigSubstitute' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1594: undefined reference to `FcDefaultSubstitute' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1596: undefined reference to `FcFontMatch' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1606: undefined reference to `FcPatternDuplicate' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1613: undefined reference to `FcPatternGetCharSet' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1615: undefined reference to `FcCharSetHasChar' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1619: undefined reference to `FcPatternGetLangSet' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1621: undefined reference to `FcLangSetHasLang' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1628: undefined reference to `FcPatternDel' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1629: undefined reference to `FcPatternAddBool' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1646: undefined reference to `FcPatternDestroy' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1648: undefined reference to `FcPatternDestroy' .obj/debug-shared/qfontdatabase.o: In function `loadFontConfig': /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1023: undefined reference to `FcObjectSetCreate' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1024: undefined reference to `FcPatternCreate' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1037: undefined reference to `FcObjectSetAdd' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1040: undefined reference to `FcFontList' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1041: undefined reference to `FcObjectSetDestroy' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1042: undefined reference to `FcPatternDestroy' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1046: undefined reference to `FcPatternGetString' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1057: undefined reference to `FcPatternGetInteger' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1059: undefined reference to `FcPatternGetInteger' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1061: undefined reference to `FcPatternGetInteger' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1063: undefined reference to `FcPatternGetString' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1065: undefined reference to `FcPatternGetInteger' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1067: undefined reference to `FcPatternGetBool' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1069: undefined reference to `FcPatternGetString' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1074: undefined reference to `FcPatternGetLangSet' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1081: undefined reference to `FcLangSetHasLang' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1100: undefined reference to `FcPatternGetCharSet' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1107: undefined reference to `FcCharSetHasChar' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1116: undefined reference to `FcPatternGetString' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1136: undefined reference to `FcPatternGetInteger' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1153: undefined reference to `FcPatternGetDouble' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1161: undefined reference to `FcFontSetDestroy' .obj/debug-shared/qfontdatabase.o: In function `getFcPattern': /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1494: undefined reference to `FcPatternCreate' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1509: undefined reference to `FcPatternAdd' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1516: undefined reference to `FcPatternAddWeak' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1524: undefined reference to `FcPatternAddWeak' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1531: undefined reference to `FcPatternAddInteger' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1533: undefined reference to `FcPatternAddBool' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1535: undefined reference to `FcPatternAddBool' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1539: undefined reference to `FcDefaultSubstitute' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1540: undefined reference to `FcConfigSubstitute' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1541: undefined reference to `FcConfigSubstitute' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1550: undefined reference to `FcPatternAddWeak' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1557: undefined reference to `FcPatternAddWeak' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1564: undefined reference to `FcPatternAddWeak' .obj/debug-shared/qfontdatabase.o: In function `loadFc': /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1707: undefined reference to `FcFontSetDestroy' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1716: undefined reference to `FcPatternDestroy' /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1718: undefined reference to `FcPatternDestroy' .obj/debug-shared/qfontdatabase.o: In function `QFontDatabase::removeAllApplicationFonts()': /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:2048: undefined reference to `FcConfigAppFontClear' .obj/debug-shared/qfontdatabase.o: In function `QFontDatabase::removeApplicationFont(int)': /iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:2027: undefined reference to `FcConfigAppFontClear' .obj/debug-shared/qfontengine_x11.o: In function `qt_x11ft_convert_pattern(_FcPattern*, QByteArray*, int*, bool*)': /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:970: undefined reference to `FcPatternGetString' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:972: undefined reference to `FcPatternGetInteger' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:975: undefined reference to `FcPatternGetBool' .obj/debug-shared/qfontengine_x11.o: In function `QFontEngineX11FT': /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:999: undefined reference to `FcPatternGetInteger' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:1016: undefined reference to `FcPatternGetInteger' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:1041: undefined reference to `FcPatternGetBool' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:1077: undefined reference to `FcPatternGetBool' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:1106: undefined reference to `FcPatternDestroy' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:1112: undefined reference to `FcPatternGetCharSet' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:1113: undefined reference to `FcCharSetCopy' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:1115: undefined reference to `FcPatternDestroy' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:999: undefined reference to `FcPatternGetInteger' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:1016: undefined reference to `FcPatternGetInteger' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:1041: undefined reference to `FcPatternGetBool' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:1077: undefined reference to `FcPatternGetBool' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:1106: undefined reference to `FcPatternDestroy' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:1112: undefined reference to `FcPatternGetCharSet' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:1113: undefined reference to `FcCharSetCopy' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:1115: undefined reference to `FcPatternDestroy' .obj/debug-shared/qfontengine_x11.o: In function `engineForPattern': /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:868: undefined reference to `FcFontMatch' .obj/debug-shared/qfontengine_x11.o: In function `QFontEngineMultiFT::loadEngine(int)': /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:929: undefined reference to `FcPatternEqual' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:932: undefined reference to `FcPatternDestroy' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:941: undefined reference to `FcPatternDuplicate' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:951: undefined reference to `FcConfigSubstitute' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:952: undefined reference to `FcDefaultSubstitute' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:956: undefined reference to `FcPatternDestroy' .obj/debug-shared/qfontengine_x11.o: In function `~QFontEngineMultiFT': /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:895: undefined reference to `FcPatternDestroy' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:897: undefined reference to `FcPatternDestroy' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:899: undefined reference to `FcFontSetDestroy' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:895: undefined reference to `FcPatternDestroy' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:897: undefined reference to `FcPatternDestroy' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:899: undefined reference to `FcFontSetDestroy' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:895: undefined reference to `FcPatternDestroy' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:897: undefined reference to `FcPatternDestroy' /iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:899: undefined reference to `FcFontSetDestroy' .obj/debug-shared/qfontengine_ft.o: In function `QFontEngineFT::stringToCMap(QChar const*, int, QGlyphLayout*, int*, QFlags) const': /iTalk/QT4/qt/src/gui/text/qfontengine_ft.cpp:1546: undefined reference to `FcCharSetHasChar' /iTalk/QT4/qt/src/gui/text/qfontengine_ft.cpp:1581: undefined reference to `FcCharSetHasChar' .obj/debug-shared/qfontengine_ft.o: In function `QFreetypeFace::release(QFontEngine::FaceId const&)': /iTalk/QT4/qt/src/gui/text/qfontengine_ft.cpp:308: undefined reference to `FcCharSetDestroy' collect2: ld returned 1 exit status make[1]: *** [../../lib/libQtGui.so.4.5.3] Error 1 make[1]: Leaving directory `/iTalk/QT4/qt/src/gui' make: *** [sub-gui-make_default-ordered] Error 2

    Read the article

  • IPC: Communication between Qt4 and MONO processes (on linux)

    - by elcuco
    I have to connect a Qt4 application to a mono Application. The current proof of concept uses network sockets (which is nice, I can debug using nc on the command line). But I am open to new suggestions. What are my alternatives? Edit: The original application stack is split into two parts: server + client. The client is supposed to show pictures and videos. Since we found that this is not possible in a sane way in Mono, we split the client into two parts: server - client - GUI In the original implementation the client+GUI were the same application. Now client is in C# (running on Mono), and the GUI is Qt4. Rewriting the client in Qt4 is not an option. Right now the communication between the client and the GUI is been done using TCP sockets through localhost. I am looking for better implementations.

    Read the article

  • Qt4 book says "make release", reality disagrees

    - by DarenW
    Writing some simple Qt4 demos depending the book by Daniel Molkentin. In that book, it says you build the release or debug versions of your app with "make release" or "make debug". In real life, these give errors. Only bare naked "make" works. I assume something has changed between the version of Qt4 used in the book and the version I'm using, qt4.6.2. So what is the proper way to determine whether to make release or debug? (And why can't google find any updates or errata for this book relating to this?)

    Read the article

  • Best protocol for client/server communication, from PHP/Perl to C++/Qt4

    - by Kyle
    I'm the author of an Open Source kiosk management system, Libki. The current version, though functional, was very much a learning experience for me. I'm working on a complete rewrite and am having a hard time deciding what protocol to use. The server will be written in PHP or Perl. Most likely PHP because I need to support some uncommon protocols that Library software use, ( SIP and NCIP ). So far I've only found a SIP2 library in PHP. The client is written in C++/Qt4. I'm looking at RPC and REST for client/server communication. I've found RPC client libraries for Qt4, and REST is already part of the Qt4 libraries. Is there an alternative I've missed? So far, REST seems to be the winner.

    Read the article

  • Getting started with Qt4: which book to read?

    - by Pieter
    I'm trying to learn Qt4. I have written code in C, C#, Python, PHP, Java and JavaScript before, but not in C++. Is there a book on Qt4 that you can recommend me? I've found some books I might like, but they're a little on the expensive side. I'm not ready to commit to Qt before I've played with it for a while, so I'd prefer to keep it under 30 bucks. I will accept the answer that gets the most up votes.

    Read the article

  • QT4, paginated showing elements

    - by matiit
    I am going to write an application that uses QT4 (with C++ or python it isnt important in that moment). One of functionality is "Showing all items in database". One item has a Title, author, description and photo (constant size) And there could be very many items. Let's say 400. There won't be enough space to show'em all at once time. One row will have 200px, so i need at most 4 for once time. How to paginate them? I have no idea. I can use limit and offset in SQL queries, but how to tell window: "that's 5th page"? Any solutions?

    Read the article

  • QT4 Designer - Implement Widget

    - by MOnsDaR
    I'm currently trying to get into QT4 and figure out a workflow for myself. While trying to create a widget which allows the user to connect to a hostname:port some questions appeared. The widget itself contains a LineEdit for entering the hostname, a SpinBox for entering the port and a PushButton which should emit a connect(QString hostname, unsigned int port) signal. In QTDesigner I created the necessary Form. It is saved as a .ui-File. Now the big question is how could I implement the widget? Is there a place in QTDesigner where I could add my signal to the Widget? Where could I add custom Properties? I've learned in another tutorial, which showed how to create a Widget in C++, how signals, slots, Q_PROPERTIES etc are defined and added to the widget. But there is no sourcecode in QTDesigner. Another option would be to generate sourcecode using uic. But the header says, that another generate would overwrite any changes to the sourcefiles. So how can I create a QT-widget completely with my own signals, slots and properties by using the QTDesigner for creating the UI and not having to recode everything whenever the UI is changing. Is there some kind of Roundtrip-Engineering? If thats not possible: Whats the sense of creating a Widget with QTDesigner then?

    Read the article

  • Qt4: QPrinter / QPainter only prints the first document

    - by hurikhan77
    The problem is that my application only prints the first document fine. The second document is empty, only the page number is printed, the rest of the page is empty. In Qt4, I'm initializing the printer in the main.cpp in the following way: mw->printer = new QPrinter(QPrinter::HighResolution); mw->printer->setPaperSize(QPrinter::A5); mw->printer->setNumCopies(2); mw->printer->setColorMode(QPrinter::GrayScale); QPrintDialog *dialog = new QPrintDialog(mw->printer, mw); dialog->setWindowTitle(QObject::tr("Printer Setup")); if (dialog->exec() == QDialog::Accepted) { mw->printer->setFullPage(TRUE); return a.exec (); } This works fine for printing the first document from the application: qDebug("Printing"); QPainter p; if (!p.begin(printer)) { qDebug("Printing aborted"); return; } Q3PaintDeviceMetrics metrics(p.device()); int dpiy = metrics.logicalDpiY(); int dpix = metrics.logicalDpiX(); int tmargin = (int) ((marginTop / 2.54) * dpiy); int bmargin = (int) ((marginBottom / 2.54) * dpiy); int lmargin = (int) ((marginLeft / 2.54) * dpix); int rmargin = (int) ((marginRight / 2.54) * dpix); QRect body(lmargin, tmargin, metrics.width() - (lmargin + rmargin), metrics.height() - (tmargin + bmargin)); QString document; /* ... app logic to write a richtext document */ Q3SimpleRichText richText(QString("<qt>%1</qt>").arg(document), QFont("Arial", fontSize)); richText.setWidth(&p, body.width()); QRect view(body); int page = 1; do { // draw text richText.draw(&p, body.left(), body.top(), view, colorGroup()); view.moveBy(0, body.height()); p.translate(0, -body.height()); // insert page number p.drawText(view.right() - p.fontMetrics().width(QString::number(page)), view.bottom() + p.fontMetrics().ascent() + 5, QString::number(page)); // exit loop on last page if (view.top () >= richText.height ()) break; printer->newPage(); page++; } while (TRUE); if (!p.end()) qDebug("Print painter yielded failure"); But when this routine runs the second time, it does not print the document. It will just print an empty page but still with the page number on it. This worked fine before with Qt3.

    Read the article

  • Qt4: QPrinter / QPainter only print the first document

    - by hurikhan77
    In Qt4, I'm initializing the printer in the main.cpp in the following way: mw->printer = new QPrinter(QPrinter::HighResolution); mw->printer->setPaperSize(QPrinter::A5); mw->printer->setNumCopies(2); mw->printer->setColorMode(QPrinter::GrayScale); QPrintDialog *dialog = new QPrintDialog(mw->printer, mw); dialog->setWindowTitle(QObject::tr("Printer Setup")); if (dialog->exec() == QDialog::Accepted) { mw->printer->setFullPage(TRUE); return a.exec (); } This works fine for printing the first document from the application: qDebug("Printing"); QPainter p; if (!p.begin(printer)) { qDebug("Printing aborted"); return; } Q3PaintDeviceMetrics metrics(p.device()); int dpiy = metrics.logicalDpiY(); int dpix = metrics.logicalDpiX(); int tmargin = (int) ((marginTop / 2.54) * dpiy); int bmargin = (int) ((marginBottom / 2.54) * dpiy); int lmargin = (int) ((marginLeft / 2.54) * dpix); int rmargin = (int) ((marginRight / 2.54) * dpix); QRect body(lmargin, tmargin, metrics.width() - (lmargin + rmargin), metrics.height() - (tmargin + bmargin)); QString document; /* ... app logic to write a richtext document */ Q3SimpleRichText richText(QString("<qt>%1</qt>").arg(document), QFont("Arial", fontSize)); richText.setWidth(&p, body.width()); QRect view(body); int page = 1; do { // draw text richText.draw(&p, body.left(), body.top(), view, colorGroup()); view.moveBy(0, body.height()); p.translate(0, -body.height()); // insert page number p.drawText(view.right() - p.fontMetrics().width(QString::number(page)), view.bottom() + p.fontMetrics().ascent() + 5, QString::number(page)); // exit loop on last page if (view.top () >= richText.height ()) break; printer->newPage(); page++; } while (TRUE); if (!p.end()) qDebug("Print painter yielded failure"); But when this routine runs the second time, it does not print the document. It will just print an empty page but still with the page number on it. This worked fine before with Qt3.

    Read the article

  • QT4 - MDI model or Dock Windows?

    - by umanga
    Greetings, In the QT application we develop we need to display several 'Viewer windows'(to display data in XY plane ,YX plane,XZ plane and in 3D). We were hoping to use MDI application model ,but later client asked for a requirement to drag and view 'Viewer windows' in multiple desktops.(using multiple monitors). This can not be done using MDI window model ,because we cannot move MDI window outside the Main Application Window. Only possible way is to use Dock windows because they can be undocked from Main Application Window and move into other desktops, but Dock windows primary used for tool-palettes or utility windows. (http://doc.qt.nokia.com/4.6/qdockwidget.html#details) Is it a good practice to use Dock window for our requirement? thanks in advance.

    Read the article

  • Supported Audio Formats of Qt4 Phonon?

    - by Nikwin
    I am making a music player in PyQt4, and I am using Phonon to play the music itself. This application is aimed primarily at Windows, but I plan on also supporting Mac and Linux versions. What I want to know is which audio formats are supported by Phonon so that I can ensure that the user only enters those files.

    Read the article

  • Cannot complete a basic task in QT4

    - by Harun Baris Bulut
    Hi all, I cannot open a new window in QT. I new in QT so I think I am missing something. I only write the code below and settings windows just shows itself and closes. I have commented out destructor but still problem persists. SettingsWindow s; s.show(); What do I do wrong ? By the way I cannot either debug it, debuger does not stop when it reaches to the first line for example. Thanks

    Read the article

  • Qt4: QMenuBar/QMenu doesn't show up on Mac OS X

    - by Erick
    Hello, I'm having difficulties to make a QMenuBar display a QMenu with a QAction under Mac OS X (Snow Leopard). Here is the code I'm using for creating the menu: void ClientWindow::setUpMenu () { QMenu * file = menuBar()->addMenu("&File"); QAction * quit = new QAction("&Quit", this); file->addAction(quit); connect(quit, SIGNAL(triggered()), this, SLOT(quit())); } Here is the ClientWindow class interface: class ClientWindow : public QMainWindow { public: ClientWindow (QWidget * parent = 0); void setUpMenu (); }; And here is my main() method: int main (int argc, char * argv[]) { QApplication app(argc, argv); ClientWindow window; window.setUpMenu(); window.show(); return app.exec(); } Any ideas why it wouldn't show up on the menu bar? Thank you all.

    Read the article

  • Simple menubar using Qt4

    - by Buzz
    Hi all i'm trying to make a simple GUI with QT 4.6. i made a separete class that represents the menu bar: MenuBar::MenuBar() { aboutAct = new QAction(tr("&About QT"), this); aboutAct->setStatusTip(tr("Show the application's About box")); connect(aboutAct, SIGNAL(triggered()), this, SLOT(about())); quitAct = new QAction(tr("&Quit"),this); quitAct->setStatusTip(tr("Exit to the program")); //connect(quitAct, SIGNAL(triggered()), &QApp, SLOT(quit())); menuFile = new QMenu("File"); menuFile->addAction(quitAct); menuLinks = new QMenu("Links"); menuAbout = new QMenu("Info"); menuAbout->addAction(aboutAct); addMenu(menuFile); addMenu(menuLinks); addMenu(menuAbout); } i can't connect the signal of the quitAct with the quit slot of the main application probably because it is not visible from the MenuBar class.. //connect(quitAct, SIGNAL(triggered()), &QApp, SLOT(quit())); how can i do it?

    Read the article

  • Basic compile issue with QT4

    - by Cobus Kruger
    I've been trying to get a dead simple listing from a university textbook to compile with the newest QT SDK for Windows I downloaded last night. After struggling through the regular nonsense (no make.bat, need to manually add environment variables and so on) I am finally at the point where I can build. But only one of the two libraries seem to work. The .pro file I use is dead simple: SUBDIRS += utils \ dataobjects TEMPLATE = subdirs In each of these two subfolders I have the source for a library. Running QMAKE generates a makefile and running Make runs through all the preliminaries and then fails on the g++ call: g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc --out-implib,libdataobjects.a -shared -mthreads -Wl -Wl,--out-implib,c:\Users\Cobus\workspace\lib\libdataobjects.a -o ..\..\lib\dataobjects.dll object_script.dataobjects.Debug -L"c:\Users\Cobus\Portab~1\Qt\2010.02.1\qt\lib" -LC:\Users\Cobus\workspace\lib -lutils -lQtXmld4 -lQtGuid4 -lQtCored4 c:/users/cobus/portab~1/qt/2010.02.1/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: cannot find -lutils The problem seems to be right near the end of the command line, where -lutils is added, indicating that there is a library by the name of utils. While I would have expected to see that, you'll notice the library names after --out include lib in the name, so they become libutils and libdataobjects. I have tried to figure out why this is happening, to no avail. Anyone have an idea what's going on?

    Read the article

  • PySide Qt4 widget exchange in a hboxlayout

    - by viraptor
    I'd like to exchange a widget inside a QHBoxLayout. This code seems to work, but as soon as I do the actual app._exec(), the code crashes with terminate called after throwing an instance of 'boost::python::error_already_set'. Is there any way to get the actual error message? (or to resolve this problem) gaParent = gameArea.parent().layout() gaParent.removeWidget(gameArea) gameArea = DrawingScreen() gameArea.setObjectName("gameArea") gaParent.insertWidget(0, gameArea)

    Read the article

  • Table and Image in a single page of QTextDocument in Qt4

    - by liaK
    Hi, I want to display a table and a image side by side. i.e Left side the image and right side the table. I want this because the image is the reference image for the data present in the table. I want that output in pdf. So I am using QTextDocument, QTextCursor and QPrinter to get the output in pdf. So how it is possible to display the image and table in QtextDocument i.e within a single page of the pdf? I am using Qt 4.5.3 and Windows Xp. Any pointers regarding this are welcome.

    Read the article

  • Qt4.6: QTextDocument <HR> tag prints only very thin, almost invisible hair lines

    - by hurikhan77
    When printing a QTextDocument with doc->print() I almost cannot see the horizontal rules inserted by <hr>. When printing to PDF these are clearly visible. But when printed to a printer these lines are very very thin lines, almost invisible on the paper. How do I fix this? I currently helped myself by inserting an <img> with a black pixel but this is very cumbersome as I have to exactly figure out the proper pixel width by trial and error.

    Read the article

  • How to create a compact Qt4 vBoxLayout

    - by Gearoid Murphy
    Hello all, I've got a vBoxLayout which contains 3 simple buttons, when I increase the size of the widget containing the layout, the spacing between the buttons increases. I would like to stop this behaviour and keep the buttons in a consistent and compact layout, regardless of the size of the parent widget. This is what I've got so far, but it doesn't change the spacing, any suggestions?, thanks. button_layout = new QVBoxLayout ; button_layout -> setSpacing(0); button_layout -> setContentsMargins(0,0,0,0);

    Read the article

  • how to create multiple selections in text edit box in qt4?

    - by Ronny
    Qt3.3 used to allow for multiple selections in the QTextEdit widget by calling the setSelection() function and specifying a different selection id (selNum) as the last argument in that function. In Qt4, to create a selection, I do it by creating a QTextCursor object and call the setPosition() or movePosition() methods. I have no problems being able to create a single selection of text. I am, however, unable to find a way to create multiple selections. The methods in Qt4 do not have an argument which allows you to set a selection id, nor can i find any other function in the QTextCursor or QTextEdit which looks like it might allow me to do so. Has this feature been completely removed from Qt4? or has is there a new and different way of doing it? Thanks. Ronny

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >