[software development] deepin V23 QT6安装配置
Tofloor
poster avatar
138******65
deepin
2025-10-08 19:01
Author
    QT 本身具有跨平台特性,原本在 windows 上使用的 QT6 建立的工程,想把程序移植到deepin 上。可是搜索了一圈没有找到一个 QT6的完整教程,各种折腾,差点放弃。最好配置好了,记录下来,其他开发者不再因为配置 QT 环境浪费时间甚至放弃。

考虑到程序需要兼容多个版本,而V25时间不长,因此选择V23 版本。下面开始具体的配置过程。

    最开始踩坑是从应用商店里安装了 qtcreator,然后再安装qt库,怎么都添加不进去。最后还是通过apt 命令安装完成。执行命令如下:
sudo apt install qtcreator qtcreator-data qtcreator-doc assistant-qt6 designer-qt6 libqt6concurrent6 libqt6core6 libqt6dbus6 libqt6gui6 libqt6multimedia6 libqt6network6 libqt6opengl6 libqt6positioning6 libqt6printsupport6 libqt6qml6 libqt6qmlmodels6 libqt6quick6 libqt6quickcontrols2-6 libqt6quicktemplates2-6 libqt6quickwidgets6 libqt6shadertools6 libqt6sql6 libqt6sql6-sqlite libqt6svg6 libqt6svgwidgets6 libqt6waylandclient6 libqt6waylandcompositor6 libqt6webchannel6 libqt6webengine6-data libqt6webenginecore6 libqt6webenginecore6-bin libqt6webenginewidgets6 libqt6widgets6 libqt6xml6 libqt6charts6 libqt6core5compat6 libqt6designer6 libqt6designercomponents6 libqt6help6 libqt6multimediawidgets6 libqt6openglwidgets6 libqt6qmlcompiler6 libqt6quick3d6 libqt6quick3dassetimport6 libqt6quick3dassetutils6 libqt6quick3druntimerender6 libqt6quick3dutils6 libqt6quicktest6 libqt6quickvectorimagegenerator6 libqt6serialport6 libqt6spatialaudio6 libqt6test6 libqt6uitools6 linguist-qt6 qdbus-qt6 qml-qt6 qml6-module-qtqml-models qml6-module-qtquick-timeline qml6-module-qtquick3d-particles3d qml6-module-qt-labs-platform qml6-module-qt-labs-qmlmodels qml6-module-qt5compat-graphicaleffects qml6-module-qtqml qml6-module-qtqml-workerscript qml6-module-qtquick qml6-module-qtquick-controls qml6-module-qtquick-controls2-styles-chameleon qml6-module-qtquick-dialogs qml6-module-qtquick-effects qml6-module-qtquick-layouts qml6-module-qtquick-shapes qml6-module-qtquick-templates qml6-module-qtquick-window qt6-image-formats-plugins qt6-translations-l10n qt6-5compat-dev qt6-base-dev qt6-base-dev-tools qt6-declarative-dev qt6-declarative-dev-tools qt6-documentation-tools qt6-l10n-tools qt6-multimedia-dev qt6-qmllint-plugins qt6-qmltooling-plugins qt6-qpa-plugins qt6-svg-dev qt6-tools-dev qt6-tools-dev-tools g++ cmake

安装过程可能比较长,但安装完成可以在启动器中找到 qtcreator



可以发送到桌面,然后打开。然后点击 工具 --> 外部 --> 配置,进入编译套件配置:


当前默认识别出来的QT6,如果没有识别,在 第一张 Qt Version 中增加,然后选择到 /usr/bin/qmake6 文件即可。然后再 构建套件(kit)中新建一个,随便起个名字就行。
新建工程就和 windows 下操作一模一样了。








Reply Favorite View the author
All Replies
wlly-lzh
deepin
2025-10-08 19:47
#1

Windows qt转Linux吗?

我最近在把我在Linux写的一个qt项目移植到Windows上,有机会的话可以交流交流。

pride

Reply View the author
流星追月
deepin
2025-10-09 12:42
#2

我一直以为吕布已结天下无敌,没想到大千世界还有高手!

Reply View the author
138******65
deepin
2025-10-09 20:15
#3
wlly-lzh

Windows qt转Linux吗?

我最近在把我在Linux写的一个qt项目移植到Windows上,有机会的话可以交流交流。

pride

可以

Reply View the author
138******65
deepin
2025-10-09 20:16
#4
流星追月

我一直以为吕布已结天下无敌,没想到大千世界还有高手!

Reply View the author
流浪的加菲
deepin
16 hours ago
#5

deepin基于Qt开发了一套开发工具叫“DTK”,deepin的系统应用都是基于DTK开发的,你如果直接动Qt环境的话,还是要注意些的,哈哈

Reply View the author
138******65
deepin
16 hours ago
#6
流浪的加菲

deepin基于Qt开发了一套开发工具叫“DTK”,deepin的系统应用都是基于DTK开发的,你如果直接动Qt环境的话,还是要注意些的,哈哈

有些是在widows上使用qt开发的,所以跨平台移植还用qt工作量小,DTK没了解改了啥,万一带来些问题搞不定可能直接劝退了。先移植过来再说

Reply View the author
wlly-lzh
deepin
15 hours ago
#7
138******65

有些是在widows上使用qt开发的,所以跨平台移植还用qt工作量小,DTK没了解改了啥,万一带来些问题搞不定可能直接劝退了。先移植过来再说

DTK兼容性不行,我以前想要把deepin-IDE迁移到Debian上使用,结果编译出来各种图标显示不清,根本用不了一点。

还有在Windows上是用不了DTK的。

Reply View the author
138******65
deepin
6 hours ago
#8
wlly-lzh

DTK兼容性不行,我以前想要把deepin-IDE迁移到Debian上使用,结果编译出来各种图标显示不清,根本用不了一点。

还有在Windows上是用不了DTK的。

我是windows上开发好的,直接deepin 上安装qt就能打开,安装qt都差点劝退,各种问题,找不到个教程,DTK先观望一下

Reply View the author