Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plan to support Qt6 #141

Open
cybaol opened this issue Apr 30, 2024 · 4 comments
Open

Plan to support Qt6 #141

cybaol opened this issue Apr 30, 2024 · 4 comments

Comments

@cybaol
Copy link

cybaol commented Apr 30, 2024

Since shiboken2 does not support python3.12 and upstream does not plan to support python3.12 in a no-maintenance state at this time, upstream's current development efforts are focused on shiboken6. Is there a plan to provide an option to support Qt6?

@clalancette
Copy link
Contributor

Since shiboken2 does not support python3.12 and upstream does not plan to support python3.12 in a no-maintenance state at this time, upstream's current development efforts are focused on shiboken6. Is there a plan to provide an option to support Qt6?

Yeah, it's a good question.

In the long-term, we should switch to Qt6. In the short-term, we haven't spent any time trying to make it work. Note that the situation is complicated by Windows, where, due to various reasons, we cannot currently switch to Qt6.

I think the best way forward here is to first work on a solution that is compatible with both Qt5 and Qt6. That can land at any time. Then, once we fix Windows so we could possibly to update to Qt6 there, we can drop the Qt5 support.

We don't have immediate plans to do this, so if you are interested in contributing, it would be highly appreciated.

@Sir-Photch
Copy link

Would it be possible to build python_qt_binding against Qt6 on platforms that support Qt6 (so, FWIW, not Windows)?

@clalancette
Copy link
Contributor

Would it be possible to build python_qt_binding against Qt6 on platforms that support Qt6 (so, FWIW, not Windows)?

Yep, that's what my reply above suggests.

@srmainwaring
Copy link
Contributor

srmainwaring commented May 11, 2024

@clalancette I've made a start on adding Qt6 support using PySide6 and Shiboken6. At present it's just the changes needed to run using Qt6 only. The plan is to support both Qt5 and optionally Qt6 once the changes needed for Qt6 have been established.

The changes to date are here:

A few of the plugins are working, the container and docking seems to be ok. There are a number of changes needed to deal with deprecated or obsolete classes, which need to be traced down for the remaining plugins.

Figure: rqt - running on macOS Sonoma 14.4.1, Python 3.12, Qt 6.7

rqt-multi-qt6

Notes for macOS

Ensure brew is updated and upgraded

brew update && brew upgrade

Create a Python 3.12 virtual environment for the colcon build. Inherit the site packages to ensure consistency between the shiboken6 generator and the PySide6 environment (this is not guaranteed if PySide6 is installed using pip).

python3 -m venv --system-site-packages ~/.venv/ros2-3.12
. ~/.venv/ros2-3.12/bin/activate
pip install -U pip setuptools

The ported repos target ROS 2 Rolling, built using the wiki instructions. A few modifications are needed.

  • do not use the version of setuptools recommended in the wiki, install latest
  • do not install nose - it does not work on Python 3.12
  • install empy==3.3.4

Update: 12 May

The windows for all the rqt plugins are now loading, some are still not displaying the topics correctly, or are missing events, but there are no major crashes.

To give some context, the target state I am aiming for is to be able to run ArduPilot SITL with DDS and Gazebo on ROS 2 Rolling with rviz and rqt for analysis, all on the latest version of macOS (M1 or Intel) in a Python 3.12 virtual environment using a fully upgraded brew environment (no pinned packages). I've established that this is feasible, the challenge now is to get all the various changes accepted into the appropriate repos (including this one).

ros2-rolling-ap-qt6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants