Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. Tags
    3. qapplication
    Log in to post

    • UNSOLVED Qt6 QProxyStyle cause app crash
      General and Desktop • qapplication qstyle qproxystyle • • Dariusz  

      17
      0
      Votes
      17
      Posts
      90
      Views

      Sorry but I still don't see why you need to delete and re-create the proxy style. But do what you like.
    • UNSOLVED malloc_consolidate(): unaligned fastbin chunk detected
      General and Desktop • c++ qt qapplication • • JoseLpd  

      5
      0
      Votes
      5
      Posts
      534
      Views

      @aha_1980 ... well, let me try to run it on Windows... At the same time I found that the malloc_consolidate function is located in the glic library...
    • SOLVED Deploying a QApplication inside a DLL == platform plugin not found even if here
      General and Desktop • deployment dll qapplication windeployqt platform • • Aria-dvp  

      3
      0
      Votes
      3
      Posts
      100
      Views

      Thank you @hskoglund for this option, it worked! This is the perfect solution for me, it's simple, and now I can use C++ variables for the install path of my DLL if needed. Thanks again!
    • SOLVED QApplication, QLabel : no such file or directory
      Installation and Deployment • qlabel qapplication • • Genne  

      10
      0
      Votes
      10
      Posts
      133
      Views

      PATH ? Why did you change that environment variable manually ?
    • SOLVED Qt 5.15.0 MSVC2019 16.6.2: Global QFile instance causes [ASSERT: "theMainThread.loadRelaxed() != nullptr" in file kernel\qcoreapplication.cpp, line 536] in Debug build
      General and Desktop • debug qfile qapplication msvc 5.15 • • oblivioncth  

      5
      0
      Votes
      5
      Posts
      91
      Views

      Hmm, while I do see some things like stackoverflow questions in which people note that created QObjects before QApplication is not supported, others say just that UI features and some static methods will not work. Additionally, the documentation for QApplication only days it must be created before any UI related objects are made, which QFile is not (at least it doesn't appear to have any ties to the UI cycle). https://doc.qt.io/qt-5/qapplication.html#details Is there anywhere else that describes this limitation in more detail/more directly?
    • UNSOLVED PySide2 QMetaObject.invokeMethod() how to ?
      General and Desktop • qapplication qmetaobject invokemethod • • Dariusz  

      8
      0
      Votes
      8
      Posts
      85
      Views

      @Dariusz If you check the PySide documentation you will see that there is no overload taking a lambda or any function/method. There are only overloads accepting strings containing method name. So, it seems not possible with PySide. But instead of using QApplication instance you could create your own class with methods you want to call using invokeMethod.
    • UNSOLVED Blurred background for Main window
      General and Desktop • qmainwindow qapplication qtwidgets qtgui • • shanmugaraja  

      3
      0
      Votes
      3
      Posts
      267
      Views

      Hi As far as I know, there is nothing like that in Qt. It can blur widgets but not the actual desktop.
    • UNSOLVED Nested QEventLoop
      General and Desktop • qapplication qeventloop qevent • • Phoenox  

      2
      0
      Votes
      2
      Posts
      424
      Views

      Events are not posted to a particular instance of an event loop object. They are posted to a thread. An event loop object does not "own" any events. It's basically a while loop that calls processEvents of a per thread event dispatcher. That being said if you nest event loops they all process the same pile of events. It's just that only the top one gets to do it while the calling ones wait for it to return.
    • UNSOLVED QWidget: Cannot create a QWidget without QApplication - OpenCV imshow() 2.4.13 ?
      General and Desktop • qwidget opencv qapplication • • R-P-H  

      30
      0
      Votes
      30
      Posts
      5468
      Views

      @sierdzio said in QWidget: Cannot create a QWidget without QApplication - OpenCV imshow() 2.4.13 ?: Is Qt the only supported backend? If yes, then indeed requirements do propagate. No, it has been added later on. It's maybe even the latest that has been implemented. AFAIK, what the OP is hitting here, is that OpenCV doesn't have an implementation for imgshow for iOS. It would require to either use Qt to show the result of what he's doing or native stuff.
    • UNSOLVED QApplication in library project
      General and Desktop • library qapplication qeventloop • • Slane  

      17
      0
      Votes
      17
      Posts
      2397
      Views

      @SGaist I wish mean throw this message : QEventLoop: Cannot be used without QApplication But this problem is no more. I have delete the project and create un other without dll... It's not the best solution but it's gona work.
    • UNSOLVED QApplication in non-main thread
      General and Desktop • qapplication threads cleanup • • AboveL  

      1
      0
      Votes
      1
      Posts
      834
      Views

      No one has replied

    • UNSOLVED Runtime error: “must construct a QApplication before a QWidget” when launching a QDialog from a dll built with static Qt
      General and Desktop • qwidget dll static build qapplication static linking • • awyarbr  

      2
      0
      Votes
      2
      Posts
      870
      Views

      Hi and welcome to devnet, Do you have any static QWidget based class in your library/application ?
    • SOLVED QApplication, listen to all mice clicks...
      QML and Qt Quick • qml qapplication mouse control • • KroMignon  

      2
      0
      Votes
      2
      Posts
      497
      Views

      I reply to my self, perhaps there is someone else which have the same kind of issue ;-) In fact, it is quite easy, the solution is to use install an event filter on application level: class MouseEventFilter : public QObject { Q_OBJECT public: explicit MouseEventFilter(QObject *parent = 0); signals: void recalibrateTouch(); public slots: // QObject interface public: bool eventFilter(QObject *object, QEvent *event) { if(event->type() == QEvent::MouseButtonPress) { if(m_delay.hasExpired(5000)) { m_clickCounter=0; m_delay.start(); } ++m_clickCounter; if(m_clickCounter == 10) emit recalibrateTouch(); } return QObject::eventFilter(object,event); } private: int m_clickCounter; QElapsedTimer m_delay; }; Then simply install the event filter on application level like this: app->installEventFilter(new MouseEventFilter(qApp)); That's it :) Regards
    • UNSOLVED Qt UI Different on different versions of linux
      General and Desktop • linux qapplication styling formatting • • HunterMetcalfe  

      12
      0
      Votes
      12
      Posts
      2384
      Views

      Thanks for sharing !
    • UNSOLVED QApplication does not exits if last window is closed with MSVC2015 WinRT 64bit
      General and Desktop • qmainwindow msvc2015 qapplication winrt msvc • • Baarnus  

      7
      0
      Votes
      7
      Posts
      2150
      Views

      Hi, just to want add, while Qt Creator's capturing of your qDebug() output is usually 100%, but if you want to be sure to get everything, you could try running DebugView when your app exits.
    • UNSOLVED QApplication::processEvents timing
      General and Desktop • opengl qapplication main loop • • Zouch  

      1
      0
      Votes
      1
      Posts
      573
      Views

      No one has replied

    • UNSOLVED Lost my QApplication
      General and Desktop • qapplication beginner header • • astroannie  

      12
      0
      Votes
      12
      Posts
      2389
      Views

      No worries for that :) Since you have it working now, please mark the thread as solved using the "Topic Tool" button so that other forum users may know a solution has been found :)
    • UNSOLVED Is there any way to know if a particular file is open/in use/locked by another application/process?
      General and Desktop • qprocess qt 5.4 qfile qapplication • • Tusharh  

      5
      0
      Votes
      5
      Posts
      1299
      Views

      @the_ will work Such a strong word ... it depends on the advisory locking mechanism used and most linux-es will support more than one. As duly noted in the documentation it's only guaranteed to work if the same scheme is used across all processes: Serialization is only guaranteed if all processes that access the shared resource use QLockFile, with the same file path.
    • UNSOLVED Last debug does not print anything :/
      General and Desktop • qapplication qdebug console • • sami1592  

      5
      0
      Votes
      5
      Posts
      1255
      Views

      @hskoglund Thanks for the info
    • UNSOLVED What is keypad navigation?
      Mobile and Embedded • embedded qapplication navigation keypad • • IL  

      4
      0
      Votes
      4
      Posts
      1809
      Views

      @SGaist Thanks Champ, I am checking it.
    • SOLVED Exit of application from GUI (QMessageBox) not working
      General and Desktop • qapplication • • RolBri  

      5
      0
      Votes
      5
      Posts
      3125
      Views

      Thank you all very much. I now created a QMessageBox in the main.cpp before constructing the MainWindow as SGaist suggested. If "no" is pressed calling QApplication::quit() does nothing, but just return 0 works perfectly fine :-)
    • UNSOLVED Application event loop gets paused when changing from desktop to TTY
      General and Desktop • linux qwidget qapplication • • nalihaven  

      3
      0
      Votes
      3
      Posts
      822
      Views

      Thanks for the response @bsomervi. I added some trace messages to my code to follow execution and I discovered that: Before changing to TTY both traces are shown, signal is being emitted and slot is being called. Once changed to TTY, signal keeps being emitted but slot is never called till I return to GUI. I added, too, trace messages in some events handled by my app and none was processed once moved to TTY (focus adquired, focus lost, painting event). I've ran tests to detect memory leaks with valgrind and nothing was shown up.
    • UNSOLVED close_event->accept() vs qApp->quit()
      General and Desktop • qmainwindow qapplication • • ravas  

      1
      0
      Votes
      1
      Posts
      476
      Views

      No one has replied

    • UNSOLVED Unloading the QLibrary causes a crash on exit
      General and Desktop • dll crash qapplication • • Arus1  

      9
      0
      Votes
      9
      Posts
      2554
      Views

      It's rarely needed to call unload.
    • [Solved] Dynamically set style.
      General and Desktop • qapplication qstyle qpalette • • tomas.soltys  

      2
      0
      Votes
      2
      Posts
      895
      Views

      OK, I found a solution. Two methods have to be called in reverse order. QStyle *style = QStyleFactory::create(styleName); QApplication::setPalette(style->standardPalette()); QApplication::setStyle(style); And now it works as desired. Tomas
    • [Solved] Library using Qt 5 with namespace in application using Qt 4 or Qt 5.
      General and Desktop • qapplication mac os x • • Melanie  

      9
      0
      Votes
      9
      Posts
      2226
      Views

      Very good ! :)
    • QApplication is lazy (or making other threads lazy in the app)
      General and Desktop • qtimer qapplication qcoreapplicatio c++ thread • • emustafa  

      2
      0
      Votes
      2
      Posts
      1035
      Views

      I asked the same quesion in stackoverflow. I gues I found out why I am having this problem. http://stackoverflow.com/questions/30686488/qapplication-is-lazy-or-making-other-threads-lazy-in-the-app
    • SOLVED Qt qDebug not working with QConsoleApplication or QApplication
      General and Desktop • qapplication qdebug qcoreapplicatio • • Marius_Linux  

      5
      0
      Votes
      5
      Posts
      10520
      Views

      OK guys, I was able to solve the problem. The Fedora people changed a configuration file, so that qDebug output wasn't shown to the user anymore, until the user changed the settings like described here: https://bugzilla.redhat.com/show_bug.cgi?id=1227295
    • [Solved] QEvent::LanguageChange
      General and Desktop • qapplication qevent qcoreapplicatio qguiapplication localization languagechange • • KiwiJeff  

      11
      0
      Votes
      11
      Posts
      5734
      Views

      @SGaist Fixed it ;)
    • QWidget: Must construct a QApplication before a QWidget error
      General and Desktop • qwidget qapplication • • justiliang  

      3
      0
      Votes
      3
      Posts
      2194
      Views

      I would also add to JKSH's answer that the docs state clearly: For any GUI application using Qt, there is precisely one QApplication object, no matter whether the application has 0, 1, 2 or more windows at any given time. This means that your classes using a QtWindowInit object are totally wrong because each QtWindowInit instance will create a new QApplication object+instance, which will conflict with the previous one(s) (they would not know which QApplication object should manage the events) -- unless you make it static, but then other problems arise, definitely thread unsafe. That's why in most Qt applications it is very often to find a QApplication (or QCoreApplication) object declaration in the very first lines of main(), and then forget about it at all. Although I am not a threads expert, I can think of creating a main thread containing the QApplication object and the methods to create new widgets. Then, in the other threads of your application, you should just give the main thread a hint on which widget to create.
    • QCommandLineParser to select gui or non-gui mode
      General and Desktop • qapplication qcoreapplicatio qcommandlinepar • • shavera  

      12
      0
      Votes
      12
      Posts
      5132
      Views

      @shavera I understand what do you mean but honestly I don't think such kind of feature could be useful; you need anyway to do something manually to run in GUI or non-GUI mode.