No, it's also an Ubuntu but 14.04. It already has Qt5 packages but only 5.2 and it's probably pointless to try to use this ancient version. Also PySide2 is not available for it.
No, it's also an Ubuntu but 14.04. It already has Qt5 packages but only 5.2 and it's probably pointless to try to use this ancient version. Also PySide2 is not available for it.
Nice!wmayer wrote: ↑Fri Nov 30, 2018 11:40 amYes, the runtime option makes most sense and gives the user full control of what he prefers. git commit 426bc0118 adds this parameter and its default value is handled by the cmake option so that users don't have to change anything.
Code: Select all
p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Dialog")
p.SetBool("DontUseNativeDialog", False)
Code: Select all
p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Dialog")
p.RemBool("DontUseNativeDialog")
Code: Select all
p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Dialog")
p.SetBool("DontUseNativeDialog", True)
As for the Py3/Qt5 issues. Like screenshot/thumbnail support. In my opinion this are great features, used by a lot of end users, and hopefully eventually will work reliably on all platforms. From FreeCAD 0.18 release point of view, they are likely not blocking issues. FreeCAD 0.19 development cycle is where focus will shift to Py3/Qt5 and therefore if such issues will get resolved for FreeCAD 0.19. That would be great.
Code: Select all
Error: Python-pyside package must be installed on your system to use the Draft module.name 'QtGui' is not defined
Error: Initializing one or more of the Draft modules failed, Draft will not work as expected.
Loading Draft module...done
CommandManager::addTo() try to add an unknown command (Draft_Line) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Wire) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Circle) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Arc) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Ellipse) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Polygon) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Rectangle) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Text) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Dimension) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_BSpline) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Point) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_ShapeString) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Facebinder) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_BezCurve) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Label) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Move) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Rotate) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Offset) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Trimex) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Upgrade) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Downgrade) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Scale) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Edit) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_WireToBSpline) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_AddPoint) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_DelPoint) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Shape2DView) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Draft2Sketch) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Array) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_PathArray) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_PointArray) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Clone) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Drawing) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Mirror) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Stretch) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Line) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Wire) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Circle) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Arc) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Ellipse) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Polygon) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Rectangle) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Text) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Dimension) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_BSpline) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Point) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_ShapeString) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Facebinder) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_BezCurve) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Label) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Move) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Rotate) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Offset) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Trimex) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Upgrade) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Downgrade) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Scale) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Edit) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_WireToBSpline) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_AddPoint) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_DelPoint) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Shape2DView) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Draft2Sketch) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Array) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_PathArray) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_PointArray) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Clone) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Drawing) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Mirror) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Stretch) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_VisGroup) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Heal) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_FlipDimension) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_ToggleConstructionMode) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_ToggleContinueMode) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Edit) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Slope) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_SetWorkingPlaneProxy) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_AddConstruction) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_ApplyStyle) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_ToggleDisplayMode) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_AddToGroup) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_SelectGroup) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_SelectPlane) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_ShowSnapBar) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_ToggleGrid) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_AutoGroup) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_UndoLine) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_FinishLine) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_CloseLine) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_Lock) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_Midpoint) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_Perpendicular) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_Grid) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_Intersection) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_Parallel) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_Endpoint) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_Angle) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_Center) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_Extension) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_Near) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_Ortho) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_Special) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_Dimensions) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_WorkingPlane) to a widget!
Draft workbench activated
Code: Select all
ii libpyside-dev 1.2.2+source1-3 amd64 Python bindings for Qt 4 (development files)
ii libpyside-py3-1.2:amd64 1.2.2+source1-3 amd64 Python3 bindings for Qt 4 (base files)
ii libpyside1.2:amd64 1.2.2+source1-3 amd64 Python bindings for Qt 4 (base files)
ii libpyside2-5.11 5.11.2-0ppa2~ubuntu18.04 amd64 Python 2 bindings for Qt5 (base files)
ii libpyside2-dev 5.11.2-0ppa2~ubuntu18.04 amd64 Python bindings for Qt5 (development files)
ii libpyside2-py3-5.11 5.11.2-0ppa2~ubuntu18.04 amd64 Python 3 bindings for Qt5 (base files)
ii pyside-tools 0.2.15-1build1 amd64 development tools for PySide (uic, rcc, lupdate)
ii pyside2-tools 5.11.2-0ppa2~ubuntu18.04 amd64 development tools for PySide2 (uic, rcc, lupdate)
ii python-pyside 1.2.2+source1-3 all Python bindings for Qt4 (big metapackage)
ii python-pyside.phonon 1.2.2+source1-3 amd64 Qt 4 Phonon module - Python bindings
ii python-pyside.qtcore 1.2.2+source1-3 amd64 Qt 4 core module - Python bindings
ii python-pyside.qtdeclarative 1.2.2+source1-3 amd64 Qt 4 Declarative module - Python bindings
ii python-pyside.qtgui 1.2.2+source1-3 amd64 Qt 4 GUI module - Python bindings
ii python-pyside.qthelp 1.2.2+source1-3 amd64 Qt 4 help module - Python bindings
ii python-pyside.qtnetwork 1.2.2+source1-3 amd64 Qt 4 network module - Python bindings
ii python-pyside.qtopengl 1.2.2+source1-3 amd64 Qt 4 OpenGL module - Python bindings
ii python-pyside.qtscript 1.2.2+source1-3 amd64 Qt 4 script module - Python bindings
ii python-pyside.qtsql 1.2.2+source1-3 amd64 Qt 4 SQL module - Python bindings
ii python-pyside.qtsvg 1.2.2+source1-3 amd64 Qt 4 SVG module - Python bindings
ii python-pyside.qttest 1.2.2+source1-3 amd64 Qt 4 test module - Python bindings
ii python-pyside.qtuitools 1.2.2+source1-3 amd64 Qt 4 UI tools module - Python bindings
ii python-pyside.qtwebkit 1.2.2+source1-3 amd64 Qt 4 WebKit module - Python bindings
ii python-pyside.qtxml 1.2.2+source1-3 amd64 Qt 4 XML module - Python bindings
ii python-pyside2.qtcore 5.11.2-0ppa2~ubuntu18.04 amd64 Python bindings for Qt5 core module (Python 2)
ii python-pyside2.qtgui 5.11.2-0ppa2~ubuntu18.04 amd64 Python bindings for Qt5 Gui module (Python 2)
ii python-pyside2.qtopengl 5.11.2-0ppa2~ubuntu18.04 amd64 Python bindings for Qt5 OpenGL module (Python 2)
ii python-pyside2.qtwidgets 5.11.2-0ppa2~ubuntu18.04 amd64 Python bindings for Qt5 Widgets module (Python 2)
ii python-pyside2uic 5.11.2-0ppa2~ubuntu18.04 all User Interface Compiler for PySide2 (Python 2)
ii python3-pyside 1.2.2+source1-3 all Python3 bindings for Qt4 (big metapackage)
ii python3-pyside.phonon:amd64 1.2.2+source1-3 amd64 Qt 4 Phonon module - Python3 bindings
ii python3-pyside.qtcore 1.2.2+source1-3 amd64 Qt 4 core module - Python3 bindings
ii python3-pyside.qtdeclarative:amd64 1.2.2+source1-3 amd64 Qt 4 Declarative module - Python3 bindings
ii python3-pyside.qtgui:amd64 1.2.2+source1-3 amd64 Qt 4 GUI module - Python3 bindings
ii python3-pyside.qthelp:amd64 1.2.2+source1-3 amd64 Qt 4 help module - Python3 bindings
ii python3-pyside.qtnetwork:amd64 1.2.2+source1-3 amd64 Qt 4 network module - Python3 bindings
ii python3-pyside.qtopengl:amd64 1.2.2+source1-3 amd64 Qt 4 OpenGL module - Python3 bindings
ii python3-pyside.qtscript:amd64 1.2.2+source1-3 amd64 Qt 4 script module - Python3 bindings
ii python3-pyside.qtsql:amd64 1.2.2+source1-3 amd64 Qt 4 SQL module - Python3 bindings
ii python3-pyside.qtsvg:amd64 1.2.2+source1-3 amd64 Qt 4 SVG module - Python3 bindings
ii python3-pyside.qttest:amd64 1.2.2+source1-3 amd64 Qt 4 test module - Python3 bindings
ii python3-pyside.qtuitools:amd64 1.2.2+source1-3 amd64 Qt 4 UI tools module - Python3 bindings
ii python3-pyside.qtwebkit:amd64 1.2.2+source1-3 amd64 Qt 4 WebKit module - Python3 bindings
ii python3-pyside.qtxml:amd64 1.2.2+source1-3 amd64 Qt 4 XML module - Python3 bindings
In FreeCAD we still use the old PySide API. So "from PySide import QtCore" imports QtCore from PySide2. If you have both version of pyside installed it depends on where the PySide->PySide2 abstraction layer is placed in sys.path.
Code: Select all
import PySide
import PySide2
print(PySide.__file__, PySide2.__file__)
Code: Select all
/home/lo/conda/envs/dakota/Ext/PySide/__init__.py /home/lo/conda/envs/dakota/lib/python3.6/site-packages/PySide2/__init__.py
Thanks for replying!!looo wrote: ↑Sun Dec 09, 2018 12:29 pmIn FreeCAD we still use the old PySide API. So "from PySide import QtCore" imports QtCore from PySide2. If you have both version of pyside installed it depends on where the PySide->PySide2 abstraction layer is placed in sys.path.
can you try the following:
In my case this gives:Code: Select all
import PySide import PySide2 print(PySide.__file__, PySide2.__file__)
the first is the abstraction layer and the second is the PySide2 module.Code: Select all
/home/lo/conda/envs/dakota/Ext/PySide/__init__.py /home/lo/conda/envs/dakota/lib/python3.6/site-packages/PySide2/__init__.py