Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.0k Topics 454.2k Posts
QtWS25 Last Chance
  • 3 Votes
    29 Posts
    29k Views

    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.

  • 0 Votes
    3 Posts
    85 Views

    @Christian-Ehrlicher perfect, thank you!

  • 0 Votes
    24 Posts
    2k Views

    Created a new project, build it and all was fine (the same code). And as stated above the reason was mixing of debug/non-debug libraries.
    Now the whole issue as it looks occurred when that Project->Options->Advanced->Use Debug Libraries was set to No (in all VS versions I have never set this value to anything.. I assume it came with VS22). Which caused that Compiler->Code Generation->Runtime libraries switched to non-debug version in the background.

    image.png

    So the solution is to switch the 'Use Debug Libraries' to true and all will be ok.

  • 0 Votes
    1 Posts
    8 Views
    No one has replied
  • Has anyone tried Qt Speech?

    Unsolved about 19 hours ago
    0 Votes
    8 Posts
    170 Views

    @SGaist Tried another one: festival, Still very robotic and unnatural. Will try more.

  • 0 Votes
    2 Posts
    17 Views

    @xurongqin Not clear to me: do you want to test Qt code or the code of your application?

  • 0 Votes
    5 Posts
    145 Views

    Thank you all for your support!
    Using the resize event works well for my case. It allows me to get the correct geometry as I expected.
    There is still a minor issue, but it’s not a big concern for my application.
    Thanks again for your helpful suggestions!

  • 0 Votes
    4 Posts
    127 Views

    I mostly agree with @Chris-Kawa. However, instead of calling setModel() I would rather suggest that PlotWidget, PlotModel and SettingsWidget are just connected through signals and slots and don't hold pointers to each other (we're talking about Qt here). Most of the time I would just do the connects inside the constructor of MainWindow. If there are too many connects I might refactor the connects into a seperate function (e.g. init()) called from the MainWindow constructor. If you are going with a controlling object as @Chris-Kawa suggests, this would go in there. However, the Controller in MVC is just connecting signals and slots in Qt. This can be done in a single function and is more procedural than object oriented. I don't really see a point in creating a separate class for this, unless the Controller has more things to do.

  • 0 Votes
    7 Posts
    109 Views

    @Bonnie No, there is a QScrollArea and the OP wants to resize a widget, so that other widgets are moved without resizing the window but using the scroll area instead.

  • 0 Votes
    14 Posts
    300 Views

    QSslSocket::sllLibraryBuildVersionString() "Returns the version string of the SSL library in use at compile time. " That is, the version of the OpenSSL libraries that the Qt binaries you are using were built to match. This does not mean those libraries are present in your runtime environment: they are detected and used if present.

    So, your runtime environment needs to have OpenSSL 1.1.1 libraries. You may be able to access a compatible version through the Qt Online Installer. Ensuring it is in the run time environment (application binary directory or PATH on Windows, LD_LIBRARY_PATH on Linux etc.) is largely up to you.

  • This topic is deleted!

    Unsolved about 16 hours ago
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • 0 Votes
    2 Posts
    64 Views

    Hi,

    Interesting one !
    As is, I don't think so, at least from an "external application" recording point of view.
    I think it should work if the application is started on the virtual frame buffer.

  • 0 Votes
    9 Posts
    256 Views

    For Qt6.7 and up: https://doc.qt.io/qt-6/qobject.html#QT_NO_CONTEXTLESS_CONNECT

  • 0 Votes
    8 Posts
    195 Views

    @auvonspam said in Problem with Ui::Dialog not recognized:

    The instructions say the 1st one should load the data. And it does. But why not the 2nd one, too?

    You are aware that in the first instance you push a button to tell it to load the data from file and push to shared memory while in the second instance you push a different button telling it to read from the shared memory? As for which of the two dialogs you click first or second that should not matter. Just you need to load from file to memory before you try to read from memory.

  • 0 Votes
    8 Posts
    198 Views

    @AstroFinch said in "No such file or directory" error qrc:

    needed to be listed as an executable

    It is not listed as an executable (your executable is named "test"). It is listed as a source item to build your executable (just like main.cpp).

  • 0 Votes
    3 Posts
    66 Views

    If I don't set an explicit plotArea, setting the QChart background will work as intended, so I don't think it's colliding with QGraphicsView's background per se. Btw in my application I'm also setting the QGraphicsView background explicitly, but the problem occurs either way.

  • 7 Votes
    5 Posts
    131 Views

    @J-Hilk
    I use Google search a lot for docs too. But once I have a page open in the Qt docs it would be nicer to search from there, particularly if, say, I am looking at a particular Qt version in the docs so it sticks to that version where Google can vary. Anyway, especially if it gave me some kind of QCompleter type suggestions/completions, so I could see what is available and not worry about mistyping a long class name etc.

    This topic refers to the "sidebar" which has been added on the left of all Qt doc web pages. I note that includes, for instance, an entry for every Qt class. That means it might be more suitable for web devs to search if they do not want to add suggestions/completions to the existing Search box which is at the top right of each page. Instead I am vaguely suggesting they might want to add a new Search box at the head of this new list/table of contents at the top left (e.g. under where you pick the Qt version dropdown), since that list already has all class names in it. If I could be given suggestions/completions against what I type there that would suffice.

  • 1 Votes
    3 Posts
    66 Views

    Unfortunately we aren't able to figure out where the problem is coming from exactly, so I cannot provide you with a minimal example; and I am also unable to give you the source-code since it is internal to our organization.

    Your answer, however, has been useful and I think I have an idea of what the problem may be. Thank you.

  • 0 Votes
    39 Posts
    2k Views

    @Jo-Jo said in Using qt for a commercial application on windows (LGPL):

    After all, we don't have real examples of anyone who did this and didn't have any problems

    I think we don't have any real example where someone did have problems. It is quite rare that companies get sued over open source licenses. Most of the time it is because they are trying to hide that they are using open source components because they don't want to comply with open source licenses (e.g. tivoization). It is also mostly large companies that get sued because they don't think they have to follow the rules. I don't think you'll get sued if you are trying your best to fulfill open source licenses (though legally speaking "doing your best" is not enough). The major problem in correctly answering your question is that there is no legal precedent how to comply with the LGPL. If you ask Qt they will always tell you that they don't know (it's because there is no legal precedent) and they'll offer you a commercial license to be on the safe side.

    I'd always choose the LGPL (even for a commercial application). The way I am using Qt I don't see any advantage in a commercial license. The only good thing about the commercial license is peace of mind. But, it is a little expensive for that (especially if you have multiple developers on the project; even more so, if some developers just occasionally program a small part of the software like two weeks a year).

  • 0 Votes
    18 Posts
    344 Views

    @Kevin-Hoang Hi,i tried to call QApplication::processEvents() in the screenAdd event,i found that it has no help. It still does not work. Thanks for your suggestion.