我一直想在QML中进行UI开发,我真的希望它看起来很自然。我找到了QtQuick.Controls(http://qt-project.org/doc/qt-5.1/qtquickcontrols/qtquickcontrols-index.html),但是当我尝试制作一个简单的应用程序时,它告诉我QtQuick.Controls不是t已安装。
main.qml:
import QtQuick 2.1
import QtQuick.Controls 1.0
Rectangle {
height: 200
width: 200
}
终奌站:
$ qmlscene main.qml
file:///tmp/main.qml:2 module "QtQuick.Controls" is not installed
另外,我从网上下载源https://qt.gitorious.org/qt/qtquickcontrols/source/stable,跑qmake && make
,但这返回以下的输出:
cd src/ && ( test -e Makefile || /usr/lib/i386-linux-gnu/qt5/bin/qmake /tmp/qtquickcontrols/src/src.pro -o Makefile ) && make -f Makefile
make[1]: Går til katalog '/tmp/qtquickcontrols/src'
cd controls/ && ( test -e Makefile || /usr/lib/i386-linux-gnu/qt5/bin/qmake /tmp/qtquickcontrols/src/controls/controls.pro -o Makefile ) && make -f Makefile
make[2]: Går til katalog '/tmp/qtquickcontrols/src/controls'
g++ -c -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -O2 -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_XKB -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_QUICK_LIB -DQT_QML_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++ -I. -I/usr/include/qt5 -I/usr/include/qt5/QtQuick -I/usr/include/qt5/QtQml -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtGui/5.1.1 -I/usr/include/qt5/QtGui/5.1.1/QtGui -I/usr/include/qt5/QtCore -I/usr/include/qt5/QtCore/5.1.1 -I/usr/include/qt5/QtCore/5.1.1/QtCore -I.moc/release-shared -o .obj/release-shared/qquickaction.o qquickaction.cpp
qquickaction.cpp:49:39: fatal error: private/qguiapplication_p.h: No such file or directory
#include <private/qguiapplication_p.h>
^
在使用Qt的本机控件之前,是否可以使用一些PPA,还是必须等待Trusty退出?问候