Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.4k Posts
  • Servomotor, Robot, Raspberry Pi Modbus ?

    Unsolved
    1
    0 Votes
    1 Posts
    214 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
    152 Views
    No one has replied
  • 0 Votes
    3 Posts
    650 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
    686 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
    258 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
    952 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
    409 Views
    JoeCFDJ
    @JoeCFD following style sheet will work. "QTableView::item:hover {background-color: transparent}" "QTableView::item:hover:selected {background-color: #selected_color }"
  • 0 Votes
    12 Posts
    2k Views
    J
    @JonB That especific array allows me to read info coming from an arduino connected to my raspberry in where I'm doing all of this so the arduino sents me the dintance from a second sensor it is Just a number for example 11 or 113 or 5 is similar to What I'm trying to do with the ESP8266 but via wifi. The arduino part is always woking no matter how much time I have the gui running so I kinda figured out my mistake must be in the way I get the value from the hmtl page wich brings me to the QNetworkAccessManager.
  • This topic is deleted!

    Unsolved
    2
    0 Votes
    2 Posts
    28 Views
  • How to use asan with qt creator 5.0.3 ?

    Solved
    10
    0 Votes
    10 Posts
    3k Views
    SGaistS
    You are using a Kit to build your application. The kit is associated with a Qt version.
  • creating a qHash function for QPointF

    Solved
    6
    0 Votes
    6 Posts
    1k Views
    Christian EhrlicherC
    I see that qHash(QPointF) was explictily deleted in with this commit: https://codereview.qt-project.org/c/qt/qtbase/+/336743 and I agree with this decision. The compiler also tells you about this. But std::hash overload still works (but has the same flaw as qHash): #include <QHash> #include <QPointF> namespace std { template <> struct hash<QPointF> { // seed is optional size_t operator()(const QPointF &key, size_t seed) const {return qHashMulti(seed, key.x(), key.y());} }; } int main(int argc, char *argv[]) { QHash<QPointF,int> pointControlsHashTable; pointControlsHashTable[QPointF(0,0)] = 25; return 0; }