Recently in business development need to update the UI in the QThread, if the UI handle through the direct update will make the program reported an error, because the update of the UI in the thread will not be captured by the original thread of the EXEC event, will lead to message event blockage generated ERROR, so the use of the signal and slot mechanism, and then I declared a signals signal in the QThread, the compilation reported this error.
The "QtRunWork" task returned false but did not log an error
No detailed warning was given, and I later checked the relevant QT instructions to solve the problem.
Solution: Add a line of macro definition to the class where you use signals and slots.
Q_OBJECT
This will work, the signal and slotted based on Q_OBJECT, we need to declare it module to our class so that the QT compiler can instantiate it, otherwise it will be exception ERROR.
Read More:
- Celery Error: Did you remember to import the module containing this task?
- [Solved] Cmake compile opencv open-source project Error: but it set OpenCV_FOUND to FALSE so package “OpenCV” is considered to be…
- Kettle reported an error and did not have permission to write files to HDFS
- Uniapp: TypeError: Cannot read property ‘apply‘ of undefined (H5 does not report an error, but the real machine runs with an error)
- [Solved] Eval Error: Uncaught ReferenceError: False is not defined
- How to Solve Error: Module did not self-register
- Fuel9.0 deployment openstack error: Deployment has failed,All nodes are finishedFailed task:Task[netconfig/1]
- [Solved] Maven Error: The packaging for this project did not assign a file to the build artifact
- [Solved] Error ‘false‘ undeclared (first use in this function)
- Android studio can’t start, running error: warning: crash service did not start
- The showdialog() method in thread/threading. Timer/task reported an error: “before ole can be called, the current thread must be set to single thread unit (STA) mode.”
- Vscode pylint reported an error of “no member”, but it is running normally
- Error: an error occurred while performing the step: “building kernel modules”. See/var/log/NV
- Browser error: Lazy require of app.binding did not set the binding field
- How to Fix Error 1069:The service did not start due to a logon failure
- [Solved] AS Run main() Error: Could not create task ‘:app:CreateOperatorDemo.main()‘
- VUE: Property or method “deleteFun“ is not defined on the instance but referenced during render. [How to Fix]
- Go declares that the local variable does not use command line arguments. Main. Go: 4:6: a declared but not used
- Opencv c++ Read Video Error: capture.isOpened() Return false
- Tidb2.1 reports Error statement count 5001 exceeded the transaction limit, autocommit = false