In Delphi I remember the use of Tthread.synchronize (Tthreadmethod), the principle is to use a hidden window to deal with.In QT debug mode, the same problem is encountered, showing the error:Cannot send events to objects owned by a different threadThe solution is to use the signal slot, which is the constant signal in the thread, and the slot function of the UI threads is constantly receiving signals and processing:So as a solution I would propose the
It is a good technique to arrange multiple buttons like QQ's friend list. qtoolbox can be used to simply implement this requirement, the qsignalmapper class using QT can easily process a large number of signals sent by different controls. The following is a small example based on these two technologies.
Ideas:1: create multiple buttons (or other controls) and put them in a group.2: connect the clicked sign
#include
It's meant to be the widget closed, and the program should exit normally.
But actually the process is still running.
The exit of the app in Qt defaults to exit automatically when the last window closes
You can change it by setquitonlastwindowclosed.
Documentation about the close () function
Closes this widget. Returns true if the widget was closed; otherwise returns false.The IT sends the wi
Develop the interface with QT4.8.6 on HiSilicon 3536 chip. GUI program is a form, in the terminal with the command line to start, instructions such as XXXX-QWS, and then click on the fork close the form, the form disappears, but the terminal command line instructions do not return, with PS view found that the process did not exit. The same code is compiled using the QT library on the PC, which is normally s
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.