Qt.Gui in FreeCAD 0.19 python module

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
keithsloan52
Veteran
Posts: 2756
Joined: Mon Feb 27, 2012 5:31 pm

Re: Qt.Gui in FreeCAD 0.19 python module

Post by keithsloan52 »

openBrain wrote: Thu Jul 30, 2020 12:46 pm I wonder what's the magic so it works in 0.18. :)
'Qt' namespace is in QtCore. So you have to import 'QtCore' and use QtCore.Qt.ScrollBarAlwaysOn
Many thanks now works a treat 0.18 or 0.19
keithsloan52
Veteran
Posts: 2756
Joined: Mon Feb 27, 2012 5:31 pm

Re: Qt.Gui in FreeCAD 0.19 python module

Post by keithsloan52 »

openBrain wrote: Thu Jul 30, 2020 12:46 pm I wonder what's the magic so it works in 0.18. :)
'Qt' namespace is in QtCore. So you have to import 'QtCore' and use QtCore.Qt.ScrollBarAlwaysOn
Out of interest so why did it work in 0.19? Qt namespace is in both QtCore and QtGui for 0.19?
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Qt.Gui in FreeCAD 0.19 python module

Post by openBrain »

keithsloan52 wrote: Thu Jul 30, 2020 6:33 pm Out of interest so why did it work in 0.19? Qt namespace is in both QtCore and QtGui for 0.19?
I have no clue ATM. Maybe some part of the QtCore.Qt namespace is bound. In your macro, do you import PySide or Pyside2 modules?
keithsloan52
Veteran
Posts: 2756
Joined: Mon Feb 27, 2012 5:31 pm

Re: Qt.Gui in FreeCAD 0.19 python module

Post by keithsloan52 »

openBrain wrote: Thu Jul 30, 2020 8:26 pm
keithsloan52 wrote: Thu Jul 30, 2020 6:33 pm Out of interest so why did it work in 0.19? Qt namespace is in both QtCore and QtGui for 0.19?
I have no clue ATM. Maybe some part of the QtCore.Qt namespace is bound. In your macro, do you import PySide or Pyside2 modules?
PySide as I thought that was supposed to handle the changes ie.. call PySide2 under the covers
Post Reply