Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • QFont crash with Qt 5

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • 0 Votes
    1 Posts
    2k Views
    No one has replied
  • [Solved] Are QWindowsStyles gone in Qt 5?

    4
    0 Votes
    4 Posts
    14k Views
    W
    Thanks. I was able to rework things to use QProxyStyle with either Qt4 or Qt5.
  • QMap implementation

    3
    0 Votes
    3 Posts
    3k Views
    M
    Without having looked at the implementation details in Qt, a red-black tree is simply a type of binary search tree. A binary search tree provides fast key lookup, as required for an associative array (map). That's because, in each search step, the number of items left to be searched is divided by two. However this only works in a "balanced" binary search tree, where each item has the same number of successors on its "left" and "right" side. Unfortunately it can happen that a binary search tree degenerates into something that look pretty much like a linked list! Then key lookup will become slow, because we (essentially) need to walk through all items, one after another. Now one could maintain a "perfectly balanced" binary search tree, by re-balancing after each "insert" or "delete" operation. This gives the best possible search performance, but "insert" and "delete" operations become too expensive! Finally the red-black tree uses a few clever rules that assure that our binary search tree won't degenerate too much, maintaining an "almost balanced" binary search tree. But as the rules are not as strict as with a "perfectly balanced" binary search tree, the red-black tree provides much faster "insert" and "delete" operations, while also guaranteeing fast key lookup (not as fast as a "perfectly balanced" binary search tree, but almost as fast). For details you may look at the Wikipedia article about the red-black tree... (I never implemented a "skip list" before, but it looks pretty much like a linked-list with a few "shortcut" links)
  • Graphicsitems movement problem

    4
    0 Votes
    4 Posts
    2k Views
    J
    Please mark post as solved ( perpend [SOLVED] to title).
  • QSslSocket and QThread

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • 0 Votes
    2 Posts
    964 Views
    J
    Good old rebuild project button and eternity of waiting solved the problem.
  • QThread and timers

    25
    0 Votes
    25 Posts
    14k Views
    A
    [quote author="goli" date="1356332295"]I have embedded device, and I don't get this warrning on the device. [/quote] I target desktop on Windows. Could be a bug?
  • Catch emitted signal from multiple class

    2
    0 Votes
    2 Posts
    2k Views
    M
    If objects that "live" in different threads are connected, a queued connection will be created, by default. However an object will only be able to process queued signals, if the thread to which that object belongs, is running an event loop! That's because in contrast to a direct connection (where the slot is called directly from the emit statement and thus from the context of the thread which called the emit), with a queued signal, the event loop of the thread where the receiver object "lives" will pick up the signal and then call the slot (i.e. the slot is now called from the context of the thread where the receiver object "lives", not from the sender's thread). So if you re-implemented QThead::run(), call QThead::exec() there in order to start an event loop in that thread...
  • Error: Symbolic links not supported: disabling -L. - BlackBerry

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • QMediaPlayer random start delay

    2
    0 Votes
    2 Posts
    3k Views
    P
    I found out that the problem was not the QMediaPlayer, it was the Timer that triggers events. The solution is to set the timer to be more presice: @ noteTimer->setTimerType(Qt::PreciseTimer); @ Problem solved :)
  • [SOLVED]How to enable tool tip on no focus

    4
    0 Votes
    4 Posts
    2k Views
    A
    Thanks! a lot. It did the job.
  • QODBC Informix Segmentation fault

    2
    0 Votes
    2 Posts
    2k Views
    C
    Try to set environment variable: DBDATE=DMY4. Note that symbol "." is important. Under Windows you can do it using IBM Informix Setnet32.
  • Mysql in qt5

    8
    0 Votes
    8 Posts
    8k Views
    A
    Thanks clocydd, I have solved it with compiling QBase code cloned from Github, in Archlinux
  • Qt5 QDateEdit Stylesheet button

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • QTimer

    4
    0 Votes
    4 Posts
    2k Views
    A
    I solved the problem myself. Thanks for the replies!
  • Internet connection with QUdpSocket

    Locked
    11
    0 Votes
    11 Posts
    8k Views
    M
    Now it's absolutely clear! Thanks for your patience!
  • Problem with new connect syntax

    3
    0 Votes
    3 Posts
    2k Views
    D
    Beware that such a lambda construct isn't a real connection between QObjects, right? So things like sender() or connectNotify() won't work. (And even a disconnect?)
  • Problem with image in PDF using QTextDocument.

    2
    0 Votes
    2 Posts
    3k Views
    M
    Try using Portable Network Graphics (.png) instead of JPEGs. I had several problems with JPEGs, too, and using PNGs fixed the problem. To convert your image, you could use any image manipulation program (e.g. GIMP), load the image and export it as Portable Network Graphic.
  • Doc not at date ?

    2
    0 Votes
    2 Posts
    891 Views
    C
    I think you are asking why the docs are using the original style for connect() and not the new style. The new style is optional. This does not make the documentation incorrect or out of date. If you want to use the optional new-style connect() then go right ahead.