Pregunta

I'm on a Kubuntu 11 system and trying out my first Qt Quick project. As this is Kubuntu I'm just running with the Qt that came with it, which has worked fine so far.

I asked Qt Creator to create the sample "Hello World" project from Qt Quick. But the design button was grayed out, as were the run buttons.

At first when I went into the Projects menu under "Run Settings" it said Qt version: [Invalid Qt Version]. Pushing the "Manage Qt versions" button brings up a tree control that looks like this:

v -- Auto-detected
|     |
|     +---Qt in PATH /usr/bin/qmake-qt4
|
+--- Manual

At the bottom of the dialog it says "Found Qt version 4.7.2, using mkspec linux-g++ (Desktop)"

I found out that I could get the "Invalid Qt version" message to go away by manually choosing to install QmlViewer from the app repositories. You'd think it would say something more like "Qml Viewer not found, please install it" but...oh well. Now it says Qt Version: [Qt in PATH].

So that's fixed, and the Qml app runs. But the "Design" button is still grayed out. Qt Designer is installed as an application, and its plugin shows in the "About Plugins..." list. The design button is enabled in ordinary (non-Qt-Quick) projects when I click on a form file, just not for .qml files.

¿Fue útil?

Solución 2

Solved it while writing the question.

To make a long story short: this appears to be a known issue in general with installing Qt Creator through the ubuntu repositories as opposed to using the Qt SDK Installer from Nokia:

http://qt.nokia.com/downloads

(That installer seems to do the work of making sure the proper SDK elements are installed, while the linux package repositories lag in getting things right.)

Another option seems to be building Qt from sources. But uninstalling the Qt Creator I got through KPackageKit and instead using the installer from Nokia was less involved, and worked for me in this case.

Otros consejos

In my case it wasn't showing up because I had my cpp file open. When I double clicked on the .ui file, the design button became active.

in the QtCreator, go to Help -> About plugins -> Select "QT Quick". Restart QtCreator and then select the ui.qml files. It should work now

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top