Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • QPSQL driver not loaded

    Solved
    5
    0 Votes
    5 Posts
    552 Views
    JonBJ
    @OniFloppa Some programs only work on certain days (especially under Windows).... ;)
  • Application won't always start

    Solved
    7
    0 Votes
    7 Posts
    498 Views
    T
    Found the problem. It was uninitialized variable in another class that was constructed in the constructor of MainWindow, causing for loop to go to to 2^32 or other random number. Sorry for taking your time for this. The Before MainWindow... was NOT always printed. It may have to do with flushing of the data in the system. I will continue monitoring but it looks good for the moment.
  • Postgresql Return no value

    Solved
    4
    0 Votes
    4 Posts
    609 Views
    Christian EhrlicherC
    @John-Hon said in Postgresql Return no value: that I can miss You simply did not read the documentation on how it works. QSqlQuery::exec() executes the query, the data is fetched with QSqlQuery::next().
  • How can I make sure that paintEvent has finished?

    Unsolved
    5
    0 Votes
    5 Posts
    356 Views
    Axel SpoerlA
    @JamalNewtron said in How can I make sure that paintEvent has finished?: Is there any option to get to know when the screen has been flushed? My Windows knowledge is very limited. From what I know, things a pretty synchronous on Windows. The issue you experience is not Qt related. It applies to all windows in Windows.
  • new class inherited from QLabel not showing in parent window

    Unsolved
    3
    0 Votes
    3 Posts
    241 Views
    H
    @Paul-Colby that's what it was! thank you!!
  • How to check the value of KeyboardModifiers?

    Unsolved
    6
    0 Votes
    6 Posts
    2k Views
    Pl45m4P
    @bluewindde After 4 years?!?! what's the point of making the same suggestion again?
  • can i use qt widget to import obj file?

    Solved
    5
    0 Votes
    5 Posts
    384 Views
    K
    To add 3D elements to your Qt Widget program, use libraries like Assimp or libQGLViewer. They enable easy import and display of OBJ files without rewriting your project. Check their documentation for integration details and examples.
  • Codec h264_cuvid is not supported

    1
    1 Votes
    1 Posts
    283 Views
    No one has replied
  • QMediaPlayer not looping

    Unsolved qmediaplayer qaudiooutput
    9
    0 Votes
    9 Posts
    2k Views
    C
    Ok, I found a solution to my problem. This is the PlaySound method from my SoundEffect class. The area of interest is the code below the note. void SoundEffect::PlaySound() { mPlayer.setSource(soundUrl); // Note about QMediaPlayer::Loops // Using QMediaPlayer::Loops::Infinite does not work correctly on Linux and Windows. // It either plays once and then stops or plays multiple times, but stops unexpectedly. // Therefore, use QMediaPlayer::Loops::Once and connect to the playbackStateChanged signal. // The slot will reset the QMediaPlayer and play the sound again. mPlayer.setLoops(QMediaPlayer::Loops::Once); connect(&mPlayer, &QMediaPlayer::playbackStateChanged, this, [this, soundUrl](QMediaPlayer::PlaybackState aState) { if (aState == QMediaPlayer::PlaybackState::StoppedState) { // Clear the source mPlayer.setSource(QUrl()); // Restore the source mPlayer.setSource(soundUrl); mPlayer.play(); } }); mPlayer.play(); }
  • Problem With QMediaPlayer

    2
    0 Votes
    2 Posts
    1k Views
    C
    @legio31 Please give more context in the form of code or the compiler output.
  • Windows Linking errors metaObject, qt_metacast and qt_metacall

    Unsolved
    2
    0 Votes
    2 Posts
    707 Views
    J
    @jalway Should there be a qmake.exe in by qt/bin folder? in my qt bin folder I see moc.exe, qlalr.exe, qsb.exe, qtpath.exe, ptpaths6.exe, qvkgen.exe, rcc.exe, tracegen.exe and uic.exe, but I don't see qmake.exe. I note that Qt VS Tools in Visual Studio 2022 requires that you find the path to that to connect to the version of QT you have installed, but I don't see qmake.exe there. I got that from here: Add Qt versions
  • QCustomPlot lag when too many points on the graph

    Unsolved
    2
    0 Votes
    2 Posts
    337 Views
    SGaistS
    Hi, You should contact the QCustomPlot folks for that kind of question. However something that is common: there's no point in trying to show a huge amount of points. Filter them, throw them out, use a moving window, but in any case don't try to show them all.
  • Error in Running QT on Am62X Phytec Board

    Moved Unsolved
    11
    0 Votes
    11 Posts
    1k Views
    SGaistS
    @Sairaj build the QtWayland module. There's not enough information in your screenshot to determine what triggers the permission denied.
  • This topic is deleted!

    Unsolved
    16
    0 Votes
    16 Posts
    122 Views
  • How to "trigger" from check bpx...?

    Unsolved
    8
    0 Votes
    8 Posts
    512 Views
    Pl45m4P
    @AnneRanch @JonB said in How to "trigger" from check bpx...?: However, signal QMenu::triggered(QAction *action) as you can see does not send any boolean, it sends a QAction *. And there is no QMenu::checked signal at all. OTOH, void QAction::triggered(bool checked = false) does exist, and sends a bool, so maybe you mean to be connecting signals from a QAction not a QMenu? I still do not see any QAction::checked signal though, but there is a QAction::toggled(bool checked). That's why I wrote @Pl45m4 said in How to "trigger" from check bpx...?: connect(subAction[index], SIGNAL(triggered(bool))), this, SLOT(testSlot(bool)); // OR connect(subAction[index], &QAction::triggered, this, &WHATEVER_CLASS_YOU_ARE_IN::testSlot); but I don't know why I'm doing this... You recommend something, the advice gets ignored, bullsh*t happens with tons of errors (of course) and then getting asked what's wrong again (╯°□°)╯︵ ┻━┻ I mean, you are not a new user anymore, but despite the fact that you don't have any programming "background", you should at least know how a (more or less) simple connection works. We are going round in circles, since years. Aren't you also eager to learn something and to finish your program?! A lot of us are really patient with you and try the best they can to explain and "teach"... but it's pretty frustrating to deal with the same stuff over and over again. It's not wrong to ask these questions but...sometimes I just can't... (often the solution is right there or just one click on a link / one documentation page away... If we refer, it's "RTFM"... which is not a bad thing)
  • Multi-process or multi-threaded start QApplication, The GUI does not work properly

    Unsolved
    6
    0 Votes
    6 Posts
    951 Views
    jeremy_kJ
    @JonB said in Multi-process or multi-threaded start QApplication, The GUI does not work properly: @jeremy_k said in Multi-process or multi-threaded start QApplication, The GUI does not work properly: There can only be one Q*Application at a time (otherwise, what would QCoreApplication::instance() return?), but it can be repeatedly created and destroyed. I always respect your expertise. Ouch! Am I that old? ;-) That emoticon may confirm it. However I would suggest it may not be as straightforward as you imply to create, fully destroy, clean up and then recreate. See for example https://forum.qt.io/topic/153620/please-destroy-the-qapplication-singleton-before-creating-a-new-qapplication-instance. Maybe that is only a PySide/Python thing, I don't know. I saw that, and see 2 3 potential issues. I don't know if python del means that the object is destroyed before the next "sequence point", or is merely unavailable to further python code. I've run into problems in my own code with large memory leaks when the garbage collector had not been executed recently. There's the global objects caveat. This example appears to be in the application programmer's code, but I believe that there has been an instance or two in Qt library code. macOS, but then it wouldn't even appear to work for a single round.
  • Qt interactive console application. QCommandLineParser

    Solved
    4
    0 Votes
    4 Posts
    875 Views
    D
    I read about GNU readline. I think this is C code project with big legacy... I read about modern linenoise. But it's also C code project... Then I try replxx. replxx is C++ project, I can easy integrate it in my Qt code. This is my example for replxx
  • Wrong size window using kde

    Unsolved kde
    3
    0 Votes
    3 Posts
    406 Views
    J
    We end up talking about another issue :-) The app is a toolbar +-----------------------------+ | | +-----------------------------+ each group of icons in the toolbar may relate to a diver, and there may be 1..4 groups of divers having a floating label atop each group on tool bar made sense and seemed hard to achieve ie LABEL1 LABEL2 +------------------------------+ | | +------------------------------+ my user did not like +-------------------------------+ | LABEL1 LABEL2 | | | +-------------------------------+ Now when toolbar size is wrong, as it is under kde only, then the whole rest of layout is messed up [4 video screens, large, normal or small, other items ie vu level] So my options are a) tame kde (to size correctly) b) don't use kde James
  • 0 Votes
    7 Posts
    2k Views
    Q
    @J-Hilk The result is same as QtConcurrent::run(). when i connect preload with QueuedConnection in main thread, then emit preload() in new thread. log shows me slot run in the new thread. [thread 28644][scenes_widget.cpp:224][Play][debug] : here is main thread [thread 33724][scenes_widget.cpp:345][ManagerRegions][info] : manager start [thread 33724][program_widget.cpp:160][_PreLoad][info] : preload next
  • Weather API in qml

    Unsolved
    2
    0 Votes
    2 Posts
    196 Views
    jsulmJ
    @Ashish_Pathak said in Weather API in qml: I did check out for weather api's online So, what did you find?