简体   繁体   中英

Qt Creator won't allow me to run GUI Application

I am currently using Qt Creator on Ubuntu Linux 12.10, and I have just started a Qt GUI application. When I click the design tab, I come to this screen:

在此处输入图片说明

As you can see, the Build and Run buttons on the bottom left are greyed out, and I don't understand why. I have searched across the web already, and have found nothing. Can anybody give me a clue as to why this is happening? Have I done something wrong?

My QT Creator version is:

Qt Creator 2.5.2
Based on Qt 4.8.2 (64 bit)
Built on Aug 19 2012 at 15:28:17

The only reason that I switched to Qt Creator is that Qt Designer cannot build applications, or edit their source code. Are the two meant to be used together? If so, how?

您位于“设计”领域,转到“编辑”或“调试”窗格。

By looking at the little computer-shaped icon, just above the run, debug and build buttons on the bottom left corner, it seems to me that either you may have not set up a version of the Qt properly, or you haven't selected one at all. Therefore no compilation is possible If you have installed the Qt Libraries, then you will need to "add" them to the QtCreator properteies.

In QtCreator go to Tools->Options-> Qt (or Qt Versions) and add a valid version of the qt libraries by selecting the path to the appropriate qmake.

If you are still having issues, I would recommend installing the Nokia-QtSDK , as it bundles the Qt libraries for different platforms (Desktop, Meego, Symbian, etc.) and it requires no extra set up.

Looking at the title bar of Qt Creator it looks like you only created (or opened) a .ui file. To compile something you need a project (a .pro file). Click File -> New and choose Application -> Qt Gui Application.

Check whether you have configured the tool chains required. You will need to provide paths for gcc compiler and qmake for building applications from Qt Creator. Check the settings in Tools->Preferences.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM