简体   繁体   English

Linux上的多个Qt版本

[英]Multiple Qt versions on Linux

I am currenyly using Debian Jessie and I have Qt Creator installed with Qt 5.3.3. 我是使用Debian Jessie的currenyly,并且我在Qt 5.3.3中安装了Qt Creator。 It works fine, however there are some issues like QSystemTrayIcon not appearing properly, which I understand doesn't occur on versions earlier than 5.0.0, so I would like to be able to switch which version I am building with. 它工作正常,但是有一些问题,例如QSystemTrayIcon不能正确显示,我知道在5.0.0之前的版本中不会发生,所以我希望能够切换要使用的版本。 Where can I download the necessary files that I can then point to from the Qt Versions tab in Qt Creator? 在哪里可以从Qt Creator的“ Qt版本”选项卡中下载指向的必要文件? Currently I can only choose 5.3.3. 目前,我只能选择5.3.3。 I would need something like 4.8.6 too. 我也需要像4.8.6这样的东西。

You can install the Qt 4 development package, libqt4-dev , using your package manager. 您可以使用包管理器安装Qt 4开发包libqt4-dev If you need a different version, you'll need to build it yourself from one of the source packages in the Qt Project's archive . 如果您需要其他版本,则需要从Qt Project存档一个源软件包中自己构建它。 Make sure to set an install prefix outside of your usual /usr , unless you know exactly what you're doing. 确保确保在通常的/usr之外设置安装前缀,除非您确切知道自己在做什么。 Usually the prefix /opt is used for this kind of thing. 通常,前缀/opt用于此类操作。

After it is installed, you can try restarting Qt Creator, and see if it is picked up automatically. 安装后,您可以尝试重新启动Qt Creator,并查看它是否自动被拾取。 If not, you can add it manually by creating a manual Qt version and pointing it to /usr/bin/qmake-qt4 (or something like /opt/qt-4.8.6/bin/qmake if you built Qt yourself and installed in the prefix /opt/qt-4.8.6 ). 如果没有,您可以通过创建手动Qt版本并将其指向/usr/bin/qmake-qt4来手动添加(如果您自己构建并安装了Qt, /opt/qt-4.8.6/bin/qmake类的/opt/qt-4.8.6/bin/qmake 。前缀/opt/qt-4.8.6 )。 You then need to set up a "Kit" as well, and then you can add a "Kit" to your project build configuration (on the projects tab in the main window). 然后,您还需要设置一个“工具包”,然后可以将“工具包”添加到项目构建配置中(在主窗口的“项目”选项卡上)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM