RUN button no enable in QtCreator for QML project
I am using QTCreator 2.2.1, based on QT 4.7.4(32 bit) on Windows XP. I made a QML project from new -> QML project menu but the RUN button is not enable. How 开发者_开发问答do I run QML project.
Have you created a new QML file instead of a Qt Quick Project? If you have created just a plain QML file it cannot be built and ran by itself.
If you are trying to create a new project from scratch, you can try selecting: File -> New -> "Qt Quick Project" from the top of the left panel and select either "Qt Quick Application" or "Qt Quick UI" from right panel depending, which one of these suits best your needs. Qt Quick Application refers to a whole application that contains both QML and C++ code and includes QDeclarativeView, and it can be deployed to a desktop or mobile platform and their respective simulators, whereas Qt Quick UI runs projects in QML Viewer and thus does not need to be built for reviewing, neither does it need development environment to be installed.
Do you have the Qt Simulator installed? Also, are you trying to build your project to Qt Simulator or a mobile platform? You can check this by opening your project to Qt Creator -> select "Projects" from left panel of the Qt Creator window -> From this view you should see the current target platforms selected for the project and Qt Simulator should be listed in 'Targets' panel. Select it if it appears to be included. If it isn't, click the plus mark to add a new target platform to your project, and check if Qt Simulator is listed there. If it isn't listed, you could try reinstalling the Qt SDK. Remember to make a custom installation instead of default install, and reassure that the Qt Simulator is being installed by going to "Development Tools" panel in Component selection screen and check that 'Simulator' is selected. Also, every time you create a new project, remember to select Qt Simulator as one of your target platform for application reviewing.
I hope this solves your issue.
精彩评论