Recently, I wrote a background program. The main window has been hidden and qmessagebox will pop up under specific circumstances. If you click the OK button in the pop-up window at this time, the whole program will exit.
The final solution: add a sentence to the main function QApplication::setQuitOnLastWindowClosed(false);
Similar Posts:
- QWidget:Must construct a QApplication before a QPaintDevice
- [Solved] pyqt5 ‘QWidget’ object has no attribute ‘setCentralWidget’
- Solving the problem of QT connecting MySQL database in Windows system: qmmysql driver not loaded
- The Java – jar *. Jar prompt in CMD is unable to access jarfile *. Jar or windows can’t double-click to run jar file. What should I do
- Js Error: SyntaxError: identifier starts immediately after numeric literal
- Could not find the main class Program will exit [How to Solve]
- window.location And window.open The difference between
- How to Solve Error: Cannot set property ‘onclick’ of null
- DevC++ Error: [Error] Id returned 1 exit status [How to Solve]
- Four ways to solve selenium’s error “element is not clickable at point…”