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
Supporting Qt6 / PySide6 / Shiboken6 #6992
Comments
Heads up to all FC packagers: |
This would be great as Qt isn't updating pyside for Qt 5 to be compatible with Python 3.10/3.11. |
have you taken a look at this? and more specifically this, FreeCAD/homebrew-freecad#267 (comment) so drilling into the bug report i filed with the upstream pyside project, https://bugreports.qt.io/browse/PYSIDE-1763 it seems certain patches could be back ported for pyside 5.15.2 to work with python ≥ 3.10 however this approach seems it will only get more brittle as dependencies move forward ie. python. i agree there should be some effort applied to begin supporting qt6 as opposed to applying patches. in another note, i know python 3.10 is released now, but does freecad use any language feature added in python 3.10 that would make it more beneficial to use python 3.10 over python 3.9. or are we just updating for the sake of updating? finally, i think this github issue should be placed in the freecad src repo, ie. https://github.com/freecad/freecad (or are we placing here because the upstream repo does not have github issues enabled on the project and is using its own bug tracker?) Several cmake files will require updating to support qt6 at the least, and not tomention all the header import statements that import/use qt libs that have probably been renamed since qt5. it will definitely require some effort. |
The problem with Python 3.10 is that it will be on most Linux distro and in the next Flatpak runtime (August 2022). So it will definitely be a problem. |
Exactly. Fedora 35 already has Python 3.10 and Fedora 36 (current rawhide) will have 3.11. TBH, I'm pretty fatigued at trying to keep FreeCAD running in Fedora. Maybe appimage/flatpak should be the primary distribution method on Linux. |
On Gentoo we have Python 3.10 and 3.11_alpha available. It's planned to make 3.10 the default Python interpreter in July. Qt6 is packaged, but still masked, and AFAICS there's not much pressure to change this. It seems like the Qt folks are preparing a special PySide version with Python 3.10 compatibility: 5.15.2.1 to be release soon, special version with Python 3.10 support. |
Why is this a problem? What code that runs with Python 3.8 cannot be executed in Python 3.10? I find it important to know precisely what code is affected and what not. |
It's discussed in the forum thread: https://forum.freecadweb.org/viewtopic.php?f=10&t=65089 |
I cannot find anything when searching for "coin3d" in this thread. Can you therefore please list the affected code here in a short list to keep the overview? |
Hopefully a new PySide release @waebbl mentioned get's released soon, but to answer part of your question: |
Transferred to FreeCAD/FreeCAD repo |
Added the Porting from PySide2 to PySide6 link to the OP of this ticket. |
Started tracking Qt6 commits to master in the OP. See Commits section |
Hi @wwmayer, how would you feel about linking Qt6 related commits to this ticket so we can track them in one place? |
339bb73 is not directly related to Qt6 but allows to reduce some |
*** There was a question on how to use FreeCad on newer linux distributions. My answer was to use appimage from official website instead of installing freecad from OS repos. |
what's still missing for qt6 support? |
MacAppBundle/CMakeLists.txt |
Added #9977 to the OP |
We're gonna need some help porting Snap to Qt6 (FreeCAD/FreeCAD-snap#19). Volunteers for this would be very much appreciated! |
FYI compiling against Qt6 with MSVC activates the |
ref: #11619 (comment) |
Are they using Py_LIMITED_API in their pyside build? Pyside6 uses it by default I think, I had to disable it to be able to build freecad on flatpak because freecad doesn't support that. |
This ticket tracks the Qt5 ➡️ Qt6 migration progress. See also dedicated forum thread
Commits
Qt6 commits to master:
Notes
Source code tasks
Module level changes
QGLWidget
and related classes (QGLContext
,QGLFunctions
,QGLShaderProgram
) have been removed. Parts of the Open GL functionality from QtGui have been extracted into this module, for exampleQOpenGLBuffer
andQOpenGLShaderProgram
. There is a new module QtOpenGLWidgets which contains the classQOpenGLWidget
, a replacement forQGLWidget
.Imports
Ex.
QAction
andQShortcut
have been moved fromQtWidgets
toQtGui
.Class/Function Deprecations
Qt.AA_EnableHighDpiScaling
,Qt.AA_DisableHighDpiScaling
andQt.AA_UseHighDpiPixmaps
are deprecated. High DPI is by default enabled in Qt 6 and cannot be turned off.QDesktopWidget
has been removed.QScreen
should be used instead, which can be retrieved usingQWidget.screen()
,QGuiApplication.primaryScreen()
orQGuiApplication.screens()
.QFontMetrics.width()
has been renamed tohorizontalAdvance()
.QMouseEvent.pos()
andQMouseEvent.globalPos()
returning aQPoint
as well asQMouseEvent.x()
andQMouseEvent.y()
returningint
are now deprecated.QMouseEvent.position()
andQMouseEvent.globalPosition()
returning aQPointF
should be used instead.Qt.MidButton
has been renamed toQt.MiddleButton
.QOpenGLVersionFunctionsFactory.get()
instead ofQOpenGLContext.versionFunctions()
should be used to obtain Open GL functions.QRegExp
has been replaced byQRegularExpression
.QWidget.mapToGlobal()
andQWidget.mapFromGlobal()
now also accept and returnQPointF
.exec_
(classesQCoreApplication
,QDialog
,QEventLoop
) have been renamed toexec
which became possible in Python 3.Other tasks
The text was updated successfully, but these errors were encountered: