How to change the QT version of VS-Qt4 Projects

Source: Internet
Author: User

Recently I am working on Medical Image software. Because MFC is too complex and I don't need C # and Java, I rolled out the qt4 camp. I created the vs2008 + qt4 project, and the plug-in is QT-vs-add-in.

After that, I found that the data volume was large, so I changed to the 64-bit environment and the original project had to be changed to the 64-bit version. But I can't create another project? Right-click the project and click Change Project QT version to modify the version. However, I found that the right-click menu does not have this option, so I am depressed.

Later I found that I would like to do this: Click covert project to qmake generated project. In the pop-up dialog box, click "OK". At this time, right-click the project,

The change project QT version is displayed. After modification, remember to click the covert project to QT add-in project above. At this time, the QT version is successfully switched.

Sometimes, when compiling a project, a fatal error is prompted, indicating that the MOC file cannot be compiled. I open the MOC file in the generated Files folder and find the following lines:

# Elif q_moc_output_revision! = 63
# Error "this file was generated using the MOC from 4.8.2. It"
# Error "cannot be used with the include files from this version of QT ."
# Error "(The MOC has changed too much .)"

If the serial number of the changed version is too large, qmake will not automatically delete the MOC file, but will continue to compile the original MOC version. We need to manually delete the MOC file and re-compile the project. After compilation, no new MOC file will appear in the generated files filter in vs. We need to manually add it under the generated Files folder in the project directory. In this way, the new project we need is established.

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.