Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.9k Posts
  • [QT 4.7.4] [SOLVED] refresh the list of drives in the QFileSystemModel

    4
    0 Votes
    4 Posts
    2k Views
    D
    @Alain38 what you mean is override "QVariant myComputer(int role)" ? if so, what should return using QDir::drives()?
  • Qt MINGW Resource Issue

    Unsolved mingw 64 bit resources images ui design
    8
    0 Votes
    8 Posts
    2k Views
    R
    @Christian-Ehrlicher What do you mean really make sure? I call it inside the constructor of classes of my static libraries (if the class uses resources). In my GUI application I call it in main after the application class (QApplication in this case) is created and before the main window is created.
  • QUdp packets loss at reciver.

    Solved
    6
    0 Votes
    6 Posts
    481 Views
    JustSoleSoleJ
    Solved by this: connect(m_pUdpSocket, &QUdpSocket::bytesWritten, this, &QUdpClient::Slot_RefillSocketBuffer);
  • The interface I programmed with Qt does not open

    Solved
    9
    0 Votes
    9 Posts
    882 Views
    serkan_trS
    @SGaist yes it worked fine I adapted the command windeployQt to cmake file. thanks for the help
  • QMessageBox without Button

    Solved
    3
    0 Votes
    3 Posts
    934 Views
    nadimnadafN
    Thanks @Chris-Kawa. It Works as expect.
  • Designer - promote layouts?

    Unsolved
    2
    0 Votes
    2 Posts
    170 Views
    Chris KawaC
    Designer doesn't have that functionality. Promoting is only implemented for widgets.
  • This topic is deleted!

    Unsolved
    3
    0 Votes
    3 Posts
    28 Views
  • How to assign getOpenFileName to a global variable

    Unsolved
    8
    0 Votes
    8 Posts
    526 Views
    SGaistS
    Then you can simply store the image path as class member variable and reuse it in the slot that will do the OpenCV processing.
  • Parsing received serial

    Unsolved
    4
    0 Votes
    4 Posts
    356 Views
    JonBJ
    @Aeroplane123 Then do so! QByteArray::mid(2).
  • numeric digit test

    Unsolved
    4
    0 Votes
    4 Posts
    326 Views
    JonBJ
    @Hayri Then use the QLineEdit::setValidator().
  • Returning QSqlQueryModel for TableView

    Solved
    23
    0 Votes
    23 Posts
    2k Views
    JonBJ
    @masa4 If it helps, you are welcome to use a local variable in a method to reference a database, just that you should not keep it around in a class member variable. You might have code looking like this (only a suggestion): DB::DB(const QString &path) { QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE"); db.setDatabaseName(path); if (!db.open()) qDebug() << db.lastError().text(); } DB::~DB() { bool valid = false; QString connectionName = ""; { // the need for these enclosing parentheses for scope is explained at https://doc.qt.io/qt-6/qsqldatabase.html#removeDatabase // only because I am going to call `removeDatabase()` here QSqlDatabase db = QSqlDatabase::database(); valid = db.isValid(); if (valid) { connectionName = db.connectionName(); if (db.isOpen()) db.close(); } } if (valid && !connectionName.isEmpty()) QSqlDatabase::removeDatabase(connectionName); }
  • sizeHintForColumn not returning size including icon size

    Unsolved
    1
    0 Votes
    1 Posts
    151 Views
    No one has replied
  • ApplicationPaletteChange event not sent to all widgets

    Solved
    9
    0 Votes
    9 Posts
    1k Views
    S
    The widget that was preventing further propagation of QEvent::PaletteChange events had a custom palette set. Removing that fixed the issue. @Chris-Kawa Thanks for pointing me in the right direction!
  • How to make an alert on the change of status of a US linked to a Qtest execution file?

    Unsolved
    2
    0 Votes
    2 Posts
    172 Views
    jsulmJ
    @Lotfi I really fail to understand what you're asking. Can you please explain better?
  • How can I make a navigation bar in QDoc

    Unsolved
    1
    0 Votes
    1 Posts
    136 Views
    No one has replied
  • The Qt maximization minimization animation causes the form to display abnormally

    Unsolved
    5
    0 Votes
    5 Posts
    738 Views
    jsulmJ
    @Nan-Feng Sorry, but I'm not your employee and don't have to take initiative. I'm not payed for helping others here. I'm doing it in my own private time. If you want better support you will have to pay QtCompany as commercial user.
  • Get executable file in QT Design studio

    Unsolved
    12
    0 Votes
    12 Posts
    2k Views
    JKSHJ
    @Zoii said in Get executable file in QT Design studio: So why should we use Qt design studio if we need Qt creator in order to create a file .exe? Is it better to create everything directly in Qt creator ? A larger team might have a dedicated UI designer and a dedicated software engineer (or even multiple of each). The UI designer would use Qt Design Studio, and the software engineer would use Qt Creator.
  • Exchange data beetwen two machines with qt app

    Unsolved
    8
    0 Votes
    8 Posts
    753 Views
    jsulmJ
    @Damian7546 said in Exchange data beetwen two machines with qt app: Even just one client with too many queries can crash my application ? Crash? I guess you mean that too many requests could block your event loop? To answer this question you should actually first do benchmarking and only introduce threads if you really have to.
  • How to make a modal dialog stay on top of an existing modal dialog?

    Solved
    7
    0 Votes
    7 Posts
    4k Views
    S
    This turned out to be a bug in Qt 5.12.4 and was fixed on upgrading to 5.15.
  • how to do it specific?

    Solved
    2
    0 Votes
    2 Posts
    159 Views
    jsulmJ
    @dachui If you want to ask the OP in the linked thread then please post in that thread instead of openning a new thread.