QT Program Release releases the ultimate solution similar to qeventloop:cannot be used without qapplication problem

Source: Internet
Author: User

Recently in the development of QT program, the program in debug run is no problem, after release to release version, there are various problems:

To report a variety of inexplicable errors, similar errors are:
  1. QEventLoop:Cannot be used without QApplication
  2. QObject::connect:Cannot connect (null)::aboutToQuit() to
  3. QNativeWifiEngine::closeHandle()
 
  1. QObject::connect:Cannot connect (null)::aboutToQuit() to QNativeWifiEngine::closeHandle()
  2. QObject:Cannot create children for a parent that is in a different thread.
  3. (Parent is QApplication(0x31f99c), parent‘s thread is QThread(0x57c058), current thread is QThread(0x598b40)
such as These abnormal information look very annoying, also do not know, I even a simple code will be error
    1. newQNetworkAccessManager()
will errorQobject::connect:cannot Connect (NULL):: Abouttoquit () to Qnativewifiengine::closehandle () Baidu everywhere, Google there is no solution, there are a few people encounter similar problems, but there is no solution. An occasional chance, I found the problem: is the library link is wrong, I wrote Qt5Network.lib It's Qt5Networkd.lib . When you change back, everything is fine. It is a big hole, the hole dug by oneself, still have to fill in. In order to remember this painful lesson, write down this article deliberately, but also to those who meet the same problem a solution.



From for notes (Wiz)



QT Program Release releases the ultimate solution similar to qeventloop:cannot be used without qapplication problem

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.