Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.7k Topics 457.9k Posts
  • Multiplatform crash handler for Qt applications

    3
    0 Votes
    3 Posts
    7k Views
    L
    Thanks, looks good. I will try it.
  • QAbstractItemModel/QTreeView

    9
    0 Votes
    9 Posts
    11k Views
    G
    There are very good explanations on the topic in "Model/View Programming":http://doc.trolltech.com/4.7/model-view-programming.html, especially regarding the drag'n'drop support in Section "Drag & drop support and MIME type handling":http://doc.trolltech.com/4.7/model-view-programming.html#drag-drop-support-and-mime-type-handling.
  • [Solved]QToolButton Hover event

    5
    0 Votes
    5 Posts
    8k Views
    S
    Did it old style : on enterEvent( leaveEvent ) for those two buttons emited signals( StartHover and EndHover ) to parent widget were I added some slots that catch those signals and set the styleSheet accordingly
  • Qt Resource System search path

    7
    0 Votes
    7 Posts
    8k Views
    L
    In case of paletes, I would think their icons are located in separate directories, i.e. @paletes |_dark | |_icon.png |_light |_icon.png @ Honestly, I would do something like this, because this way I have more control of what's going on rather than letting resource system do this. @enum Palette { PALETTE_DEFAULT = 0, PALETTE_DARK, PALETTE_LIGHT }; void switchPalette(Palette iPalette) { QString prefix; switch (iPalette) { case PALETTE_DARK: prefix = "dark"; break; case PALETTE_LIGHT: case PALETTE_DEFAULT: prefix = "light"; break; } // use QIcon(QString(":/%1/icon.png").arg(prefix)); }@ I admit this solution is not "beautiful" enough (as we say). But I would do this way.
  • Why is there no copying at QNetworCookieJar?

    26
    0 Votes
    26 Posts
    13k Views
    G
    Then there's no solution to your problem - you can't have your cake and eat it too :-) I would go for the subclass approach. reinterpret_cast is ugly and should be avoided whenever theres a more elegant (and save!) solution - just my 0,02 € - :-)
  • QTestLib and signal emission.

    4
    0 Votes
    4 Posts
    6k Views
    L
    [quote author="Thanatos" date="1287584432"] I see that this is excellent way how to investigate problems (and learn more deeply Qt source). I am kind of new to programming, no real experience - university does not count in my opinion =) Maybe or (and others as well) can explain me how to properly browse through Qt modules? For now i see that each module has *.pro file so i can open each module in Qt Creator as project. Seems fine, but just in case - is there any better way? [/quote] University, I wish I could go to the university again. Just love that time. Anyway, I don't know how to describe the better way. It's just everyone is doing this in his own and more convenient way. I'll tell you how I do it. I read Qt's source code if I have some problems or if I don't understand completely, the way something works. Getting to know Qt modules starts for me from getting to know its API. [quote author="Thanatos" date="1287584432"] Also i am not clear in which file did you find the source code for QTest::mouseClick? in .\qt\src\testlib\ I can see the qtest.h file but not the qtest.cpp ? Thanks in advance. [/quote] I found it in this file src/testlib/qtestmouse.h. The implementation of mouseClick is in this header. You will find several signatures for it.
  • QWizardPage nextId() strange behaviour

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Crash in takeChild() while deleting a QTreeWidgetItem

    25
    0 Votes
    25 Posts
    16k Views
    ?
    4.5.3 is old :( ... it would map to Qt 2009.?? can you let me know
  • Error in compiling helloworld program

    7
    0 Votes
    7 Posts
    5k Views
    D
    ok i ran g++ on Nokia Qt SDK cmd which is in all programms>Nokia Qt SDK> Symbian Folder. here is the output Setting up environment for Qt usage... C:\Windows\system32>g++ g++: no input files
  • Problem with QImage and JPEG

    4
    0 Votes
    4 Posts
    4k Views
    A
    It is best to check if image formats and other things supplied by a plugin (such as SQL drivers, for example) are available before trying to use them from your program. If they are not, the program should indicate that error. In your case, query QImageWriter::supportedImageFormats() to see if JPEG is supported by the running instance of your application before using it.
  • How to constrain window movement?

    13
    0 Votes
    13 Posts
    8k Views
    Q
    I'd like to but my employer would not like it at all, even if it was abstract code, so unfortunately I can't say more than I have.
  • 0 Votes
    12 Posts
    7k Views
    G
    Some of the Qt Widgets support already associating some data with it (e.g. QComboBox can associate a QVariant value to each of the choices you have, see "http://doc.qt.nokia.com/4.7/qcombobox.html#addItem":http://doc.qt.nokia.com/4.7/qcombobox.html#addItem
  • [Solved] How to propagate keyPressEvent on different qt QMainWindow

    28
    0 Votes
    28 Posts
    54k Views
    S
    bq. Hello all, Indeed the events are propagated to the parent but it stops to the top level parent (ie. the window). This is to make sure that all events get sensibly propagated tovisual parents. So if you want to propagate a key event from on main window to another one, you’ll have to do it manually. Thank's thierry, this tips is in the documentation of qt?
  • Need help in QTableView

    7
    0 Votes
    7 Posts
    5k Views
    ?
    Should you close the db resources before you exit? you can chk further in QSqlDatabase doc
  • DLL problems

    5
    0 Votes
    5 Posts
    3k Views
    F
    If you're using Qt Creator, you can modify the PATH to use in the Run environment, adding the path to your DLLs there.
  • Filesize of PDF-print is quite big

    3
    0 Votes
    3 Posts
    3k Views
    ?
    Nor have I seen such big difference, can you post some test program here that can reproduce your problem
  • 0 Votes
    2 Posts
    3k Views
    ?
    Hi jackbauer_777, it should be Qt and not QT (Quick Time)
  • Product keys / trial

    13
    0 Votes
    13 Posts
    13k Views
    S
    Thanks!
  • Rcc: File does not exist

    12
    0 Votes
    12 Posts
    18k Views
    S
    bq. ok just tried my suggestion, and there is no warning message too e.g.: My qrc file has 1.jpg, and in code I refer to 2.jpg forgive my interruption, like I said it was a wild guess :p Ok, i think you tell error in syntax in .qrc not in a code :) In this case yes, no warning :) But i thinks is normal not check if the files exist or not, it assume QString is a valid files :)
  • [Solved] MFC application using DLL created by Qt

    5
    0 Votes
    5 Posts
    9k Views
    J
    When I compiled Qt by VC2008express, I didn’t meet above trouble. So This problem was solved for me^^; .