Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.3k Posts
  • I need help for build an open source project, please.

    Unsolved
    6
    0 Votes
    6 Posts
    509 Views
    ronaldonR
    Yes, thanks guys. I have seen the error like you say. It was a conflict of params ( QString and QFile ) in the function. Thank all of you!!!
  • 0 Votes
    2 Posts
    304 Views
    M
    Resolved: It was a bug in my code
  • This topic is deleted!

    Solved
    6
    0 Votes
    6 Posts
    30 Views
  • 0 Votes
    8 Posts
    7k Views
    JonBJ
    @Aleksey_K ...which is indeed where I suggested telling the debugger to ignore certain signals...
  • 0 Votes
    4 Posts
    2k Views
    JonBJ
    @JKSH said in How to check QT license from command line? Legal to release app using opensource QT libs if we own commercial license?: I don't know the official answer to your question Somewhere on the Qt company web site talking about licensing I believe they claim you cannot (are not allowed to) mix commercial with open source. That is why I recommended the OP check with them, or at least their web site where it talks about licensing requirements.
  • File Locking with Resource Compiler. Why?

    Unsolved
    3
    0 Votes
    3 Posts
    418 Views
    A.v.OA
    @Christian-Ehrlicher said in File Locking with Resource Compiler. Why?: I don't see what Qt can do against this - when the OS says that there are no resources available (No locks available) the app can't do anything against it. It is Qt's resource compiler that is doing the locking.
  • LayoutDirection weirdly affects the XY coordinates

    Unsolved
    4
    0 Votes
    4 Posts
    308 Views
    DorosD
    @Chris-Kawa @Christian-Ehrlicher I expected that the RTL mode reverse also coordinate frame. There is no spacer item in my Hboxlayout. I will try your advices. Thanks.
  • QCryptographicHash results mismatches

    Solved qcryptographich file
    12
    0 Votes
    12 Posts
    2k Views
    B
    @Christian-Ehrlicher No, and I asked you to check the original question rather than the latest update, which you seem to have trouble understanding without the original context. So here's the quote from the original question for you: When I run this [code in question] under GNU/Linux the output hash is the same as a result of running command line tool md5 or md5sum. When I run the very same code under MacOS - I get different hashes from the application and command line. I never wrote I was trying to compare hashes between two different OSes (and files for that matter). The mismatch was between hash given by the Qt code I quoted and the regular command line tool hashing a file on the same OS.
  • Showing negative values of axis on the progress bar

    Unsolved qt5 progress bar
    9
    0 Votes
    9 Posts
    2k Views
    D
    @SimonSchroeder I want to update my progress bar, if one of these values greater than 0. For example if the dizi[1] > 0, update. I dont want to see dizi[0]. Because of it i started from 1
  • How to implement a simple widget that like QT Designer?

    Unsolved
    6
    0 Votes
    6 Posts
    354 Views
    raven-worxR
    @hei6775 QListView with a custom QAbstractListModel i guess. also read this: https://doc.qt.io/qt-5/model-view-programming.html#using-drag-and-drop-with-item-views to make your model provide custom drag data
  • From QMake to CMake. (Different path levels)

    Solved
    5
    0 Votes
    5 Posts
    1k Views
    J
    Thank you all, I found the last fail, with your help. In that path distribution, I must supply the complete main path in add_executable. add_executable(${TARGET} app02/main.cpp) Perhaps is there a better solution, so, if somebody want add something, please, you're welcomed
  • QProxyStyle with Qmenu and tray appear slowly first time

    Unsolved
    8
    0 Votes
    8 Posts
    657 Views
    KaguroK
    @Christian-Ehrlicher Sorry for late! I had so many different work :( Today i will provide a minimal example! Thanks a lot! :)
  • QFormBuilder does not save 'name' attribute on a 'widget' element

    Solved
    3
    0 Votes
    3 Posts
    263 Views
    A.v.OA
    Solved in (6.1.0 Beta 1 [19433]) Has been reported as a bug and was solved only in version 6.
  • Producer–consumer multithread QQueue + QSemaphore

    Solved
    4
    0 Votes
    4 Posts
    2k Views
    D
    Thanks for the info. I was able to find my answer on this thread: @kshegunov said in Proper way to Manage Information Between Threads: @VRonin said in Proper way to Manage Information Between Threads: The semaphore is redundant here. No, it is not!!! @darkp03 said in Proper way to Manage Information Between Threads: I was quite disappointed to know that reimplementing the run method isnt the correct way, but everywhere on internet says that. Don't be, the internet is wrong. It's a valid thing to do if you don't need to use any of the signal-slot machinery. However your queue implementation looks a bit off. Consider this one: Producer(s): QByteArray data; //< Data to put in the queue inputNeeds.acquire(); // First wait for more data to be consumed if needed (do not overfill the queue). QMutexLocker lock(&queueMutex); queue.enqueue(data); queueAvailability.release(); Consumer(s): queueAvailability.acquire(); QMutexLocker lock(&queueMutex); if (queue.size() <= 0) return; //< So graceful exit is possible QByteArray data = queue.dequeue(); inputNeeds.release(); Where variables are: QSemaphore queueAvailability, inputNeeds; //< inputNeeds is initialized to some number (e.g. 10000) in the beginning - that's the maximum number of items the queue will hold so it doesn't overflow if the consumer(s) lag behind QMutex queueMutex; QQueue<QByteArray> queue; So mutex and sempahore makes sense
  • Check for QTranslator::load

    Solved
    25
    0 Votes
    25 Posts
    3k Views
    H
    I have found out what was the problem. For some reason I don't know every time I build the application Qt Creator will create the binary in the debug folder even though I have it set to release. None of the changes I was making was actually taking effect since I was always checking .exe file from the release which was remaining unchanged the whole time. So I took the .exe from the debug folder and deployed it and all is working fine. Now I have to check what might me going when building my app cause the .exe is pretty big and I am not sure if is the release or the debug(it is in the debug folder, but I built it with release build set). I thank you all for the time and patience. I really appreciated it.
  • QGroupBox derived class does not inherit setParent(QObject* parent);

    Unsolved
    2
    0 Votes
    2 Posts
    129 Views
    Christian EhrlicherC
    setParent() is not a const function so don't pass a const pointer.
  • How to design the widget like this(1PassWord for PC);

    Unsolved
    3
    0 Votes
    3 Posts
    235 Views
    raven-worxR
    @qazaq408 in QtWidgets there is directly no such feature. You could mimic it with a QTreeView and styled item delegate. The first level items are the sections and the second level items are the actual items in your list. The QML ListView supports such sections out of the box though.
  • Execution freezes when sending QRunnable to QThreadpool

    Unsolved
    4
    0 Votes
    4 Posts
    387 Views
    J.HilkJ
    @John-Howe works fine by me class HelloWorldTask : public QRunnable { public: void run() override { while (true) { QThread::msleep(16);//60Hz, ca. qDebug() << "Hello world from thread" << QTime::currentTime() << QThread::currentThread(); } } }; int main(int argc, char *argv[]) { QApplication app(argc, argv); // QCoreApplication app(argc, argv); QLabel responsiveLabel("Move me"); responsiveLabel.resize(200,200); responsiveLabel.show(); HelloWorldTask *hello = new HelloWorldTask(); // QThreadPool takes ownership and deletes 'hello' automatically QThreadPool::globalInstance()->tryStart(hello); return app.exec(); }
  • Looking for suggestions or hints on best way to...

    Unsolved
    10
    0 Votes
    10 Posts
    545 Views
    SPlattenS
    I've made some progress in this area, not all widgets have USER property, but its pretty simple to figure out.
  • Android error after Qt update?

    Unsolved
    2
    0 Votes
    2 Posts
    284 Views
    M
    The same problem happened to me with that version of Qt. The most annoying part is that the application is running without any problem, but each time I have to ignore the errors to deploy it. Searching further It seems to be fixed with version 15.1 https://bugreports.qt.io/browse/QTCREATORBUG-24321 https://codereview.qt-project.org/c/qt/qtbase/+/308209 Regards Massimiliano