【QT】Ubuntu22.04 配置 QT6.5 LTS

【QT】Ubuntu22.04 配置 QT6.5 LTS

1.注册QT Group的账号

进入官网(QT Group)进行账号注册,个人或企业可以获得10天的免费使用,学生则可以获得免费的License,如果是学生的话可以进行学生邮箱验证(Get Educational Licenses),然后获得免费的License,具体如下:

Image

填写这样的表单然后提交,等QT发邮件过来(可能需要十几分钟),然后进入学生邮箱然后激活,之后就可以顺利下载QT Creator了。

2.安装QT Creator

进入官方的下载页面(Download QT for Linux),进行默认下载就行。然后打开下载的路径,为下载好的安装文件qt-unified-linux-x64-4.7.0-online.run,添加可执行权限,然后执行安装

chmod +x ./qt-unified-linux-x64-4.7.0-online.run 
./qt-unified-linux-x64-4.7.0-online.run 

会进入这样的安装页面,然后登陆你的QT Group账号,这里会检测License,如果注册了Edu License就可以顺利通过,如果没有则需要申请10天的试用,

Image

然后设置你的安装路径和需要安装的组件即可

Image

等待安装完毕即可。

3.启动QT Creator报错from 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.

安装完毕后,我们启动QT Creator,如果报错如下:

from 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin. Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: minimalegl, scb, eglfs, minimal, linuxfb, vkkhrdisplay, offscreen, vnc, wayland, wayland-egl.

则表明我们需要安装依赖xcb-cursor0

sudo apt-get update
sudo apt-get install libxcb-cursor0

4.运行QT的demo

启动QT Creator,然后选择一个自己喜欢的demo,直接使用默认配置

Image

然后编译运行即可,效果如下

Image

Reference

[1]Ubuntu22.04安装Qt之后启动Qt Creator失败报错“from 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Q”
[2]How To Install the Qt Educational License

相关推荐

  1. Alibaba Cloud Linux 3.2104 LTS 64位系统可以选择吗?

    2024-04-28 10:16:03       64 阅读
  2. Alibaba Cloud Linux 3.2104 LTS 64位镜像兼容CentOS吗?

    2024-04-28 10:16:03       52 阅读
  3. 阿里云Alibaba Cloud Linux 3.2104 LTS 64位镜像系统介绍

    2024-04-28 10:16:03       57 阅读
  4. Ubuntu22.04LTS配置rsync服务

    2024-04-28 10:16:03       59 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-28 10:16:03       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-28 10:16:03       101 阅读
  3. 在Django里面运行非项目文件

    2024-04-28 10:16:03       82 阅读
  4. Python语言-面向对象

    2024-04-28 10:16:03       91 阅读

热门阅读

  1. VMware 中将 Rocky Linux 设置为图形界面

    2024-04-28 10:16:03       162 阅读
  2. 面: Linux的内存过载问题是如何解决的

    2024-04-28 10:16:03       105 阅读
  3. 项目开发流程

    2024-04-28 10:16:03       96 阅读
  4. Rust学习03:解决了如何更改项目名称的小问题

    2024-04-28 10:16:03       28 阅读
  5. Ubuntu 20.04 安装搜狗输入法,无法输入中文问题

    2024-04-28 10:16:03       35 阅读
  6. 常用的启发式算法

    2024-04-28 10:16:03       89 阅读
  7. 人工智能和机器学习:定义未来的科技

    2024-04-28 10:16:03       31 阅读
  8. 绘图神器draw.io

    2024-04-28 10:16:03       38 阅读