QT5-为桌面安装Qt快速组件。

时间:2022-10-12 23:15:39

I have some installation issues with the Qt Quick Components for Desktop, using QT5.

使用QT5,我在桌面的Qt快速组件上有一些安装问题。

Following are the steps I have followed (based on these instructions):

以下是我遵循的步骤(基于这些说明):

  1. Downloaded the tar.gz from http://qt.gitorious.org/qt-components/desktop/trees/master, and unpacked the components.

    下载了焦油。gz来自http://qt.gitorious.org/qt-components/desktop/trees/master,并打开组件。

  2. Added to PATH variable value in the environment variables (OS : Windows 8) C:\Qt\Qt5.3.1\5.3\msvc2012_opengl\bin;C:\Qt\Qt5.3.1\Tools\QtCreator\bin;

    在环境变量中加入PATH变量值(OS: Windows 8) C:\Qt\Qt5.3.1\5.3\msvc2012_opengl\bin;C:\Qt\Qt5.3.1\工具\QtCreator\bin;

  3. Run the vcvars32.bat script (Visual Studio 2012).

    运行vcvars32。bat脚本(Visual Studio 2012)。

  4. Ran the command: qmake && nmake install in \qt-components-desktop\components folder.

    运行该命令:qmake && nmake安装在\qt-component -desktop\components文件夹。

  5. Ran the command: qmake && nmake install in \qt-components-desktop\src folder. This command has automatically copied the compiled component files to QT import folder.

    运行该命令:qmake && nmake安装在\qt-component -desktop\src文件夹。该命令自动将已编译的组件文件复制到QT导入文件夹。

During step 5, I got these errors:

在第5步中,我得到了这些错误:

fatal error C1083: Cannot open include file: 'QtGui/qmenu.h': No such file or directory
fatal error C1083: Cannot open include file: 'QtGui/qmenu.h': No such file or directory
fatal error C1083: Cannot open include file: 'QtGui/qgraphicsitem.h': No such file or directory
fatal error C1083: Cannot open include file: 'QtGui/QStyle': No such file or directory
.\qdeclarativefolderlistmodel.cpp(162) : error C3861: 'setRoleNames': identifier not found
fatal error C1083: Cannot open include file: 'QtGui/QStyle': No such file or directory
fatal error C1083: Cannot open include file: 'QtGui/qgraphicssceneevent.h': No such file or directory
fatal error C1083: Cannot open include file: 'QtGui/QAction': No such file or directory
fatal error C1083: Cannot open include file: 'QtGui/QApplication': No such file or directory
Generating Code...
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\cl.EXE"' : return code '0x2' Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\nmake.exe"' : return code '0x2' Stop.

I understand that these errors are occurred because the source code is for QT4, and these include deceleration (like QtGui/QApplication) are no longer exist in QT5.

我理解这些错误发生是因为源代码是QT4,而这些包括减速(如QtGui/QApplication)在QT5中已经不存在了。

I googled a lot, but I couldn't find how can I download this plugin for QT5, as in http://qt.gitorious.org/qt-components/desktop/trees/master for QT4.

我在google上搜索了很多,但是我找不到如何在QT5上下载这个插件,就像http://qt.gitorious.org/qt-components/desktop/trees/master for QT4。

Any idea? or maybe there is another issue that I missed?

任何想法?或者可能还有另一个我错过的问题?

1 个解决方案

#1


2  

I found the alternative components in QT5:

我在QT5找到了替代的组件:

according to this wiki, Qt Quick Controls replaced the former one Qt Desktop Components. So for using these components when porting QML code from QT4.x to QT5.x, you need to replace import Qt.labs.components *version*in your QML file with import QtQuick.Controls *version*.

根据这个维基,Qt快速控制取代了前一个Qt桌面组件。因此,在从QT4移植QML代码时使用这些组件。x QT5。您需要在QML文件中替换import Qt.labs.components *version*,导入QtQuick。控制* *版本。

Hope this will help someone...

希望这能帮助到某人…

#1


2  

I found the alternative components in QT5:

我在QT5找到了替代的组件:

according to this wiki, Qt Quick Controls replaced the former one Qt Desktop Components. So for using these components when porting QML code from QT4.x to QT5.x, you need to replace import Qt.labs.components *version*in your QML file with import QtQuick.Controls *version*.

根据这个维基,Qt快速控制取代了前一个Qt桌面组件。因此,在从QT4移植QML代码时使用这些组件。x QT5。您需要在QML文件中替换import Qt.labs.components *version*,导入QtQuick。控制* *版本。

Hope this will help someone...

希望这能帮助到某人…