Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • Not painting

    Solved
    8
    0 Votes
    8 Posts
    613 Views
    PerdrixP
    @Axel-Spoerl Found it!! (At least I think so) I needed to change SelectRect::rectButtonPressed() so that it ended with: show(); raise(); activateWindow(); }
  • Widget above widget (searchBox)

    Solved
    2
    0 Votes
    2 Posts
    154 Views
    JonBJ
    @AndrzejB I believe you are asking here how to place one widget on top of another widget, right? Then I would Google for qt widget on top of widget. https://stackoverflow.com/questions/28147360/qt-widget-displayed-over-other-widgets is one such hit, though I don't know if there are better ones. I think you don't want to place the two widgets on a layout because that will adjust them to not overlap. Someone else may have a better answer.
  • High performance image blending

    Unsolved
    2
    0 Votes
    2 Posts
    367 Views
    SGaistS
    Hi, Depending on what you want to do, you can simply convert the result from OpenCV to a QPixmap to show it.
  • How can I connect a "function pointer" to a slot in Qt?

    Unsolved
    9
    0 Votes
    9 Posts
    2k Views
    L
    @JonB @SimonSchroeder @wrosecrans @SGaist Thank you guys for all your help - that looks very promising! I will let you know the results! Great Help!
  • How to set line height in a richtext?

    Unsolved
    1
    0 Votes
    1 Posts
    210 Views
    No one has replied
  • Strange segfault

    Unsolved
    9
    0 Votes
    9 Posts
    585 Views
    J.HilkJ
    @Alexey-Volkov said in Strange segfault: any chance to get patch for this issue? I would apply it to my build not sure, don't think, so, it will be released, but its time gated which OpenSSL is used in Qt6? I think OpenSSL3 v6.2.0
  • QUdpSocket not emiting readyRead in a multi files project

    Unsolved
    23
    0 Votes
    23 Posts
    2k Views
    Christian EhrlicherC
    @febinaf said in QUdpSocket not emiting readyRead in a multi files project: Since the bind() is in the constructor of the class, creating new objects will execute the bind() method again and again, right? Then move it to somewhere else or simply create two QUdpSocket instances.
  • Qt compatibility with Visual Studio

    Unsolved
    3
    0 Votes
    3 Posts
    519 Views
    D
    @JonB Thanks Jon. I will give a try.
  • retranslateUi method freezing application - Multi language support

    Unsolved
    12
    0 Votes
    12 Posts
    1k Views
    M
    @SGaist I will check it out, thanks.
  • How to use QThread

    Unsolved
    7
    0 Votes
    7 Posts
    611 Views
    S
    @0verEngineer said in How to use QThread: Why is "connection 1" printed after "Hello World!", "Bye World!" and "connection 3"? You write that it should first do process() and only after that print "connection 1". process() itself prints "Hello World!" and "Bye World!". After that it emits finished() which will most likely be a direct connection by default because it is all within the same thread. This means that immediately the slot for WorkerThread::finished will be executed and print "connection 3". Now, process() returns and only then "connection 1" can be printed. "connection 2" is printed later because thread is in a different thread than worker. This makes it a queued connection and thus could be executed in any order.
  • Qt 6: Move QList contents without copying?

    Unsolved
    21
    0 Votes
    21 Posts
    3k Views
    S
    @JonB said in Qt 6: Move QList contents without copying?: Think about if it appends a list of 1,000,000 items to an existing list of one item. Moving and appending a list (like a linked list) could be made an O(1) operation Well, you are right about that. However, I would expect that something would be done with the data afterwards. Iterating over the elements of a linked list and the elements of a vector is both O(n). Still, in the general case a vector will be faster because of consecutive memory whereas a list might have many cache misses. If iteration is done more than once the vector might be faster (after copying 1,000,000 items). It is a very tricky problem.
  • Sending a Post request with JSON and Image data

    Unsolved
    5
    0 Votes
    5 Posts
    438 Views
    P
    @ChrisW67 and @jsulm from the server got some multipart boundary issue
  • Completion for QFileSystemModel

    Unsolved
    8
    0 Votes
    8 Posts
    757 Views
    JonBJ
    @Diego-Iastrubni Although I agree that code is naughty to be doing QFileSystemModel-specific in QCompleter, I think it just makes pathFromIndex() return the full path. I don't know why that should be a problem for you. It would explain data() being called with QFileSystemModel::FileNameRole a lot. I still think your original code should work with setCompletionRole(QFileSystemModel::FileNameRole).
  • How to implement collapsible sidebar with QSplitter that can be toggled with a button

    Unsolved
    2
    0 Votes
    2 Posts
    1k Views
    Z
    I use the following and it works: pcoSplitter->setSizes({ pcoSplitter->size().width(), 0 });
  • Problems trying to access the Qt online installer.

    Solved
    4
    0 Votes
    4 Posts
    287 Views
    lincolnL
    @jsulm Hello again here, it happens that I already solved my problem, and it is something strange since I installed another browser and with that I was able to download the installer without problems, the truth is that I do not know why with the browser I had it did not let me download the installer. anyway thanks for your reply.
  • Qt 5 -> Qt 6 Stream operator for QVariant

    Unsolved
    3
    0 Votes
    3 Posts
    614 Views
    K
    @ChrisW67 Excellent! That was the issue and all bugs resolved. Quite the ctrl+F exercise for my entire project but I don't see another way around. Looks like support for previous stream versions will be there for a while. Thanks for the fast reply!
  • Swap rows QTableWidget

    Unsolved
    12
    1 Votes
    12 Posts
    2k Views
    SGaistS
    Hi, You should use InternalMove if you plan to only move things around within the same QTableWidget. That said, you really should consider implementing delegates. As explained in the documentation, setCellWidget should only be used to show some static content.
  • QTreeView on_item_clicked and on_item_doubleclicked

    Solved
    7
    0 Votes
    7 Posts
    906 Views
    C
    @Christian-Ehrlicher Thanks, for that information, that (although I still think the on_doubleClick function should operate the same as the on_click function), provided me a way of making sure it was the left button firing the event. Thanks everyone for your input..
  • How to write specific tag in existing XML using QXmlStreamWriter ?

    Unsolved
    2
    0 Votes
    2 Posts
    220 Views
    JonBJ
    @MECoder said in How to write specific tag in existing XML using QXmlStreamWriter ?: How can i write to a specific tag in an existing XML file without writing the complete XML fiel again? You can't update an actual XML text file (just like you can't for any text file). You have to rewrite the whole new XML over the whole file.
  • Visuals not refreshing without mouse movement

    Unsolved
    12
    0 Votes
    12 Posts
    1k Views
    JoeCFDJ
    @PLL3 That could be a Qt bug. You can work around the issue by manually triggering a useless mouse event to update it after it is enabled since you know a mouse event can update it. Or upgrade your Qt to see if the problem is fixed.