Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • How can I keep a QComboBox from changing width due to contents?

    17
    0 Votes
    17 Posts
    27k Views
    L
    Also much more late but I fixed this by simply overriding showEvent to not do anything. class NoAdjustComboBox : public QComboBox { public: void showEvent(QShowEvent* e) override { return QWidget::showEvent(e); } };
  • setGeometry not working when QPushButton clicked event triggered

    Solved
    3
    0 Votes
    3 Posts
    345 Views
    KaguroK
    @Pl45m4 Ohhh I understand now! And yeah this way it works perfectly! Thanks you are my hero today! :D
  • This topic is deleted!

    Unsolved
    2
    0 Votes
    2 Posts
    33 Views
    No one has replied
  • Servomotor, Robot, Raspberry Pi Modbus ?

    Unsolved
    1
    0 Votes
    1 Posts
    207 Views
    No one has replied
  • How to efficiently identify the cause of Qt 6.5 high DPI bug in Windows?

    Unsolved
    1
    1 Votes
    1 Posts
    1k Views
    No one has replied
  • QT Creator - Debug QT Source Code (Using Windows & MingW Only)

    Unsolved
    8
    0 Votes
    8 Posts
    1k Views
    B
    @JasonCA I think this might be a BUG, see https://bugreports.qt.io/browse/QTBUG-86790 they seem to fix it from Qt5.15.11 and Qt6. And from this https://bugreports.qt.io/browse/QTBUG-88022 it seems that before 5.15 the .debug files are not used and there should be pure debug binaries.
  • a SIGSEGV in Linux

    Solved
    14
    0 Votes
    14 Posts
    1k Views
    S
    Found the source of the crash. void QXcbConnection::processXcbEvents(QEventLoop::ProcessEventsFlags flags) { int connection_error = xcb_connection_has_error(xcb_connection()); if (connection_error) { qWarning("The X11 connection broke (error %d). Did the X11 server die?", connection_error); exit(1); <= HERE } In my app, Qt runs in a child thread and when it meets the exit(1), the standard cleanup proceeds. But my app is multi-threaded... Thank you everyone for your help.
  • QVideoFrame to QOpenGLTexture without using QImage

    Unsolved
    1
    0 Votes
    1 Posts
    146 Views
    No one has replied
  • 0 Votes
    3 Posts
    635 Views
    M
    @SGaist said in Re-activate (known as create a new substance) a QMainWindow after the last QMainWindow is closed: Based on this feature request, you should be able to react on the ˋQEvent::ApplicationActivate`. I'm using that in a subclass of QApplication. The idea in pseudo code: void Application::applicationStateChanged ( Qt::ApplicationState state) { if(state==Qt::ApplicationActive AND no window is open AND OpenUntitledWindow ) { openNewWindow(); } OpenUntitledWindow is a flag setting if an new window/document should be opened on startup, it works also when the app is reactivated with the code above.
  • 0 Votes
    4 Posts
    679 Views
    SGaistS
    Looks like you may have unearthed a bug. You should check the bug report system to see if there's something already about it and if not please open a new ticket providing your findings.
  • Why is there no description of QRegExpValidator in qt6.0.1? Is it abandoned?

    Unsolved
    7
    0 Votes
    7 Posts
    3k Views
    SGaistS
    @Bo-Katan Hi and welcome to devnet, No, it's not a renaming, QRegExp and friend classes have been deprecated in Qt 5 and removed in Qt 6. QRegularExpression and friends are new classes built on top of PCRE.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    10 Views
    No one has replied
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    10 Views
    No one has replied
  • Correctly update QScrollArea containing QLabel dynamically removed

    Solved
    3
    0 Votes
    3 Posts
    251 Views
    A
    @Bonnie Thank you for your help ^^ Your reply leaded me to check something, and this was the problem : when I added a TrackLabel, I called : ui->scrollAreaWidgetContents->layout()->addWidget(l); But I didn't removedd it from the layout when take the TrackLabel from the vector and deletelater() I did it now and it works fine : ui->scrollAreaWidgetContents->layout()->removeWidget(activeTrack); I wipe all those "refresh painting" method from my code, except for all show() which seems are necessary, And I kept qApp->prrocessEvents() but outside of refrefhWidget (it was a bad idea, since I call this method in a resize event, and a lot of qApp->prrocessEvents() each time I resize for 1 pixel make it... crash ! I put qApp->prrocessEvents() only when I have to do an ensureWidgetVisible (have to do it to force recomputing the 'maximum' of the scroll bar or something like that)
  • QTableWidget and edit mode

    Unsolved
    22
    0 Votes
    22 Posts
    4k Views
    V
    @JonB This looks interesting. I'll try to work with this, thanks!
  • Moving window blocks Qt SerialPort data reception

    Unsolved
    7
    0 Votes
    7 Posts
    945 Views
    Dummie1138D
    @kuzulis Hi. My apologies for reviving an old thread, but what did mean when you said this? A best solution is to move the QSerialPort instance to the separate thread, using moveToThread() function. ;) When you said separate thread, what do you mean? Is this to create a new thread specifically for the QSerialPort? To mods: I will repost this into a new question if any mods ask me to.
  • This topic is deleted!

    Solved
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • How to compile just a specific module from the qt source?

    Unsolved
    12
    0 Votes
    12 Posts
    2k Views
    R
    I found the cause of the errors, i compiled the new source using the x86 Native Tools Command Prompt for VS 2022 instead of the x64, it end up generating x32 exe. Whenever I modify a source file and call ninja Widgets to it get compiled, it get compiled quickly < 1min afterward i'm calling npm --install . to get the recompiled file copied from the qt-everywhere-src-6.4.0 folder to the D:\Qt\Debug But this task is taking a lot of time, it is iterating through thousand files checking which are not updated: -- Up-to-date: D:/Qt/Debug/include/QtDesigner/6.4.0/QtDesigner/private/qdesigner_formeditorcommand_p.h -- Up-to-date: D:/Qt/Debug/include/QtDesigner/6.4.0/QtDesigner/private/qdesigner_formwindowcommand_p.h -- Up-to-date: D:/Qt/Debug/include/QtDesigner/6.4.0/QtDesigner/private/qdesigner_formwindowmanager_p.h -- Up-to-date: D:/Qt/Debug/include/QtDesigner/6.4.0/QtDesigner/private/qdesigner_introspection_p.h -- Up-to-date: D:/Qt/Debug/include/QtDesigner/6.4.0/QtDesigner/private/qdesigner_membersheet_p.h -- Up-to-date: D:/Qt/Debug/include/QtDesigner/6.4.0/QtDesigner/private/qdesigner_menu_p.h ... Am i doing this correctly? There's another way to copy directly the file that got modified/recompiled instead of checking one by one which the command --install .?
  • Any better way not to display hover color on qtablewidget?

    Solved
    2
    0 Votes
    2 Posts
    401 Views
    JoeCFDJ
    @JoeCFD following style sheet will work. "QTableView::item:hover {background-color: transparent}" "QTableView::item:hover:selected {background-color: #selected_color }"