Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
84.0k Topics 460.0k Posts
Qt 6.11 is out! See what's new in the release blog
  • Reporting inappropriate content on the forums

    Pinned Locked spam
    29
    4 Votes
    29 Posts
    42k Views
    A
    Thank you for the report. I have banned the user, which got rid of the spam posting. Not a loss, as this user did not post any other content on the site. Just deleting this one posting was not possible. Thanks for reporting this.
  • QObject's QThread from shared library

    Unsolved
    3
    0 Votes
    3 Posts
    69 Views
    S
    @Christian-Ehrlicher said in QObject's QThread from shared library: You must be doing something in your Tester ctor. In the code above you can see that there is totally empty ctor :) But looks like that I have found the issue. Need to check it tomorrow.
  • Python / PySide6 - swipe gesture?

    Unsolved
    13
    0 Votes
    13 Posts
    801 Views
    jeremy_kJ
    @CarlB said in Python / PySide6 - swipe gesture?: Hi - while I've disabled the setting, its a little awkward... to put into context, a friend of mine has ended up vibe-coding a similar songbook program - this is done in javascript, and he's able to swipe to next song with a single finger - I find it odd to see that I python / qt can't do something similar...? Does in javascript mean in a web browser? You can, but QSwipeGesture doesn't provide it out of the box. start from QSwipeGestureRecognizer in qtbase/src/widgets/kernel/qstandardgestures.cpp and create a modified version of QSwipeGestureRecognizer::recognize to require 1 instead of 3 touch points. Use a pan gesture instead. Embed a web view, and implement the swipe logic there in javascript. Quick SwipeView or SwipeDelegate might be more appropriate.
  • Freezing issue caused by socket and UI updates in the thread and main thread

    Unsolved
    3
    0 Votes
    3 Posts
    67 Views
    Joe von HabsburgJ
    @SGaist said in Freezing issue caused by socket and UI updates in the thread and main thread: Remove that infinite loop -> Qt is event driven so grab the data when it arrives then trigger the processing That for check crc void UdpSocket::processIncomingDatagram() { static const QByteArray magic("\x55\xAA\x55\xAA", 4); while (true) { const int pos = m_buffer.indexOf(magic); if (pos < 0) { m_buffer.clear(); break; } if (pos > 0) m_buffer.remove(0, pos); if (m_buffer.size() < 8) break; const quint32 len = qFromBigEndian<quint32>(reinterpret_cast<const uchar*>(m_buffer.constData() + 4)); if (m_buffer.size() < 8 + static_cast<int>(len)) break; const QByteArray frame = m_buffer.left(8 + static_cast<int>(len)); if (!calculateCrc(frame)) { m_buffer.remove(0, 1); continue; } parseData(frame); m_buffer.remove(0, 8 + static_cast<int>(len)); } } @SGaist said in Freezing issue caused by socket and UI updates in the thread and main thread: If the data is "too fast" then there's no sense in trying to show it all the time, your users won't be able to see all these changes (it's like trying to show a billion points -> useless). Batch the updates at a rate that is useful. I also use decimation for points. @SGaist said in Freezing issue caused by socket and UI updates in the thread and main thread: Also, there's no need to subclass QUdpSocket, you just use it thus avoid subclassing in this case. no no no my UdpSocket class is QObject
  • Qt Creator takes CPU 100% when IDE terminates

    Unsolved
    5
    0 Votes
    5 Posts
    284 Views
    M
    @ChrisA said in Qt Creator takes CPU 100% when IDE terminates: Any resolution? I'm having this on macOS with Qt Creator 19.0.2. After quitting, Activity Monitor shows CPU at 100% until I force-quit. Same issue here on macOS with Qt Creator 19.0.2 — following this thread in case anyone finds a fix.
  • QPalette is useless after QSS

    Unsolved
    5
    0 Votes
    5 Posts
    280 Views
    Pl45m4P
    @Chris-Kawa said in QPalette is useless after QSS: QSS does not overwrite palette. Of course it does not change the current palette itself. But it changes the current appearance of the active palette by adding modifications to it. If that makes sense. This is what I mean above.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    57 Views
    No one has replied
  • QComboBox further styling?

    Unsolved
    6
    0 Votes
    6 Posts
    294 Views
    S
    We started with this style sheet (it's been a while ago, so it might have changed in the meantime): https://github.com/colinduquesnoy/qdarkstylesheet We just grabbed the .qss and the necessary icons from that repository. This was because we wanted to have a dark style (and at first used the default light mode of Qt on Windows). Qt didn't have a dark mode back then. Then we searched for all the different colors that are used. Here are the colors we have found (and maybe even changed some colors): BACKGROUND ----------- Light #4D545B #505F69 (unpressed) Normal #31363B #32414B (border, disabled, pressed, checked, toolbars, menus) Dark #232629 #19232D (background) FOREGROUND ----------- Light #EFF0F1 #F0F0F0 (texts/labels) Normal #AAAAAA (not used yet) Dark #505F69 #787878 (disabled texts) SELECTION ------------ Light #179AE0 #148CD2 (selection/hover/active) Normal #3375A3 #1464A0 (selected) Dark #18465D #14506E (selected disabled) Each occurrence of a color we replaced with %1, %2, %3, etc. in the style sheet. If we want to apply either light mode or dark mode we load the style sheet as string and replace the dark or light colors with QString::arg() and then apply the style sheet.
  • Asking clarification about a documentation section

    Unsolved
    5
    0 Votes
    5 Posts
    169 Views
    R
    @Christian-Ehrlicher didn't seen that at first but was wondering about the table containing all default icons and their names and changing their size.
  • QTcpSocket spamming EALREADY

    Unsolved
    8
    0 Votes
    8 Posts
    450 Views
    Kent-DorfmanK
    dear op: there is a difference in TCP syn reject vs tcp syn drop. The reject would send a (nak) signal back.. the dropping would leave the sender unknowing whether the recipient ever received the syn signal in the first place. I think you need to re-look at your methodology for determining whether the server is "available". I'm less inclined to believe it is a QT framework bug. You may need to do a deep dive on the QAbstractSocket::SocketError type and understand exactly why each of those conditions can occur, and react accordingly.
  • Maybe im to dumb, but i cant get the icons to work.

    Solved
    26
    0 Votes
    26 Posts
    806 Views
    MSC615M
    @SGaist oooohh right. oversaw the %1 in the path. yeee gonna put something there for the user warning when i got the other things done!
  • Which development tools to use when I want some AI assistance?

    Unsolved
    14
    0 Votes
    14 Posts
    673 Views
    cristian-adamC
    @Simmania With Qt Creator 20 you can use the ACP Client to connect to an ACP Agent like Claude Agent, Codex CLI, or OpenCode and do any AI work. The ACP Client plugin is part of the OpenSource Qt Creator.
  • Condense redundant ComboBox signal/slot code

    Solved
    9
    0 Votes
    9 Posts
    793 Views
    L
    @SimonSchroeder Ahh ok that's much easier than what I am doing now. Thank you!
  • 0 Votes
    6 Posts
    335 Views
    A
    Alright, thank you for your suggestion. I'll give it a try
  • QSpinBox behaves strangely when padding is set

    Unsolved
    6
    0 Votes
    6 Posts
    255 Views
    Christian EhrlicherC
    So it's the windowsvista style. I can reproduce it but no idea how to fix it. You might create a bug report -> bugreports.qt.io
  • NetworkManager StatusChanged D-Bus signal not being received.

    Solved d-bus networkmanager 6.8.3
    3
    0 Votes
    3 Posts
    128 Views
    V
    Or, more likely it was the dumb mistake of doing a quick hack for testing, which deleted my test object...
  • Read cursor position as it changes using `HoverHandler`?

    Unsolved
    2
    0 Votes
    2 Posts
    696 Views
    GrecKoG
    HoverHandler has a point property which has a position property. Alternatively since you are implementing your QQFBO in c++ you can override hoverMoveEvent and handle it there (after calling setAcceptHoverEvents).
  • Qt Widgets or Qt Quick/QML for this application?

    Unsolved
    6
    0 Votes
    6 Posts
    1k Views
    S
    @jeremy_k said in Qt Widgets or Qt Quick/QML for this application?: @Simmania said in Qt Widgets or Qt Quick/QML for this application?: plus the OSG stuff This might be a misunderstanding. The Qt Quick 2 scene graph isn't OpenSceneGraph. Sorry, I ment the QSG.
  • GCC 16 warnings about incomplete types in an SFINAE context

    Unsolved
    24
    0 Votes
    24 Posts
    2k Views
    SGaistS
    To add to @jeremy_k KDE folks also implements that technique in their libraries/software.
  • Need a canvas like widget

    Solved
    5
    0 Votes
    5 Posts
    252 Views
    J
    @JonB said in Need a canvas like widget: QMainWindow is a containing widget with a complex layout as shown in the pic. You could create something like it yourself with parent-child widgets and layouts --- so it is not "magic" --- but it's convenient to use it for just the layout you want. Make the central widget be whatever for your canvas and its relative coordinates will be used for anything you place on it. The menu and status bars will not overlap or interfere with its coordinates. Well, as it turned out, I did already have a QMainWindow, but wasn't aware of what it actually provides, so I got mself a QMainWindow and then explicitly created a QMenuBar inside rather than using the already provided w->menuBar(); (*w is my QMainWindow). I now do w->setCentralWidget(new QWidget); Canvas *Drawingarea = new Canvas(w->centralWidget()); and Bob's my father's brother. Reading (in Germany we have a saying that "Whoever can read has a definite advantage") the documentation about QMainWindow, it is actually exactly what I need!