Search code examples
c++windowsqtqt-creatorqt5

Run button is disabled in Qt Creator


This happens even on a freshly created, empty project.

The Run (and also Debug) buttons are disabled for the Qt5 configuration (they're enabled for the Qt4 configuration). The build button is not disabled, however, and it works - I can build the project, but I can't run it from Qt Creator.

They are disabled in the Build menu as well. Everything is enabled and works fine for the Qt4 configuration, however.

It's a Qt/C++ project, on Windows 7 (32-bit).

enter image description hereenter image description here

Edit:

I found a couple of related questions - RUN button no enable in QtCreator for QML project and http://qt-project.org/forums/viewthread/15737, but they have slightly different circumstances, and they don't show a clear solution. I'm posting them in case they help, though.

Edit 2:

I checked the run configuration for Qt5, as suggested by @Blueman and @Fabian, and the executable field is empty (and also disabled), even though the Build configuration correctly specifies the path. Moreover, I get this error - "The .pro file untitled2.pro could not be parsed." Here's a screenshot:

enter image description here


Solution

  • I installed QtCreator 2.8.1 for test purposes and compile some project with Qt4.8.6 and Qt5.3

    Result is the same as your, there is a disabled run button for Qt5 configuration and a parse problem with .pro file. Probably it's a bug.

    My suggestion is to change QtCreator to latest version (everything works fine for me).

    You don't have to reinstall whole qt environment, just install last QtCreator (link). It will be a separate application so you can also use the old one if needed.

    Only problem is that the new installation (by default) use the same localization of settings as the old one. This may cause a problem.

    I solved this by changing the default path of settings for new installation. After installation (don't run !) create on desktop (or somewhere else) a shortcut for application, right click -> properties. Under the shortcut tab, you will see an area that says Target, add at end:

    -settingspath path

    where path is place where setting will be placed.

    for me it look:

    C:\Qt\Tools\qtcreator-2.8.1\bin\qtcreator.exe -settingspath C:\Qt\Tools\qtcreator-2.8.1\settings

    If new installation don't recognize both qt version and you don't know how to add it - just ask, I will add additional description.

    [EDIT]

    I found related question, the same problem, update of QtCreator was a solution.