我希望在QML中进行UI开发,我真的希望它看起来是本地的。我找到了QtQuick.Controls (http://qt-project.org/doc/qt-5.1/qtquickcontrols/qtquickcontrols-index.html),但是当我尝试制作一个简单的应用程序时,它告诉我QtQuick.Controls没有安装。
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>
^我是否可以使用一些PPA,或者在使用Qt中的本机控件之前,我必须等待可靠的输出?问候
发布于 2013-10-30 15:57:57
Quick可以从Qt5.1开始使用,而Ubuntu存储库中的Qt5版本似乎是Qt5.0.2。因此,您不能在Ubuntu存储库中将QtQuick控件与当前版本的Qt5一起使用。
如果你想使用它们,你有三个选择:
Ubuntu.Components (这是它们的名字)不是真正的QtQuick控件,但是它们非常相似,如果您知道Ubuntu.Components是如何工作的,您将知道QtQuick控件是如何工作的。要获得更多信息,请看一下Ubuntu开发人员上的相应页面。https://askubuntu.com/questions/368507
复制相似问题