Hi community,
Today we’ve made a significant leap forwards for Qt.py and implemented a guarantee where if your program runs with Qt.py and any binding, such as PySide2, it will run in an identical fashion on any binding.
This means that it will throw an error if you use any feature of any particular binding that isn’t available on another binding.
This is possible with the current iteration of Qt.py.
1: from Qt import QtGui, QtCore
2:
3: class Widget(QtGui.QWidget):
4: my_signal = QtCore.pyqtSignal(str)
QWidget is only available via QtGui in PyQt4 and PySide(1).pyqtSignal which would work well on both PyQt4 and PyQt5, but fail in PySide and PySide2.With this new change, Qt.py limits the available members of each submodule into a subset of members that exist across all bindings. The result is finding out about these problems faster and being able to guarantee that if it runs on one binding, it works on all.
1: from Qt import QtGui
2:
3: class Widget(QtGui.QWidget):
4: pass
5:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'QWidget'
As it is a breaking change, this bumps Qt.py from a 0.x.x release into a 1.x.x. This means some of your already-written software with Qt.py may need some tweaking. On the up-side, the software that would behave badly now, are those that would have already behaved badly in any of the 4 bindings. So this is your chance to smoke some of that out.
We are confident in this change and direction, but are still in discussion about whether now is the right time. One of the bindings, namely PySide2, is so far behind the other bindings that it the weakest link by far, and critical submodules - such as QtOpenGL - is still missing.
These are the modules supported by Qt.py with this change.
__all__ = [
"QtGui",
"QtCore",
"QtWidgets",
"QtNetwork",
"QtXml",
"QtHelp",
"QtCompat"
]
The second concern regards which version of this weakest link to match. As PySide2 matures, more feature will be added and Qt.py could start to grow. But Maya 2017 and others are currently fixed at version 2.0.0. Growing Qt.py beyond what Maya 2017 is capable of would limit its usefulness.
For this I figure it wouldn’t be too cumbersome to implement compatibility profiles; where the end-user specifies which version of, say, the VFX Platform to provide support for.
$ # For example
$ export QT_BASELINE=CY2018
$ python -c "from Qt import QtOpenGL"
For the time being, and where you need functionality exclusive to any particular binding, such as sip in PyQt, there is still the __binding__ member that allows conditional inclusion.
if "PySide" in __binding__:
do_pyside_stuff()
This would allow you to explicitly mark the parts of your codebase that depend on any particular binding, and to enable a bridge to your code today and your code sometime in the future when the required functionality is officially part of Qt.py.
For now, we’d appreciate your feedback on this major change and for you to test it out for yourself. The release is still considered “alpha” and is available directly via GitHub for download or install.
$ pip install git+git://github.com/mottosso/Qt.py
Thanks to Matthew Levine for the initial feature request and Fredrik Averpil for the unwavering support. :)
Best,
Marcus
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmODFjo%2BzMcM0OzmnDxJ2BeTNZ%2BjNHPQVKtJoEv-w7PT%3D%2BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmODFjo%2BzMcM0OzmnDxJ2BeTNZ%2BjNHPQVKtJoEv-w7PT%3D%2BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAMLepcbyCV4wdGkKVMW62dy4%3DdUJkX%2BfnvR3ToeTGAmDW2NzvQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Something I had used before all before Qt.py:self.connect(self.pbBrowse, QtCore.SIGNAL("clicked()"), QtCore.SLOT(self.browse))doesn't work because QtCore doesn't contain SIGNALhowever when I try:self.connect(self.pbBrowse, QtCore.Signal("clicked()"), QtCore.Slot(self.browse))I get this error:# Error: TypeError: file D:\Tech-Art\Core\Python\Qt\wgWidgets.py line 280: Unknown signal argument type: instancemethod #
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmODFjo%2BzMcM0OzmnDxJ2BeTNZ%2BjNHPQVKtJoEv-w7PT%3D%2BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
----
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAMLepcbyCV4wdGkKVMW62dy4%3DdUJkX%2BfnvR3ToeTGAmDW2NzvQ%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmODFjo%2BzMcM0OzmnDxJ2BeTNZ%2BjNHPQVKtJoEv-w7PT%3D%2BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
----
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAMLepcbyCV4wdGkKVMW62dy4%3DdUJkX%2BfnvR3ToeTGAmDW2NzvQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0v8HxvzVhZj2VkbgeQw%2BapGunHfZ1G0OAc7_WSvTR%2B3Q%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmODFjo%2BzMcM0OzmnDxJ2BeTNZ%2BjNHPQVKtJoEv-w7PT%3D%2BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
----
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAMLepcbyCV4wdGkKVMW62dy4%3DdUJkX%2BfnvR3ToeTGAmDW2NzvQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0v8HxvzVhZj2VkbgeQw%2BapGunHfZ1G0OAc7_WSvTR%2B3Q%40mail.gmail.com.
Hi Justin,thanks for the reply but both methods you suggest don't work for me:self.connect(self.pbBrowse, QtCore.Signal("clicked()"), self, QtCore.Slot("browse()"))# Error: TypeError: file D:\Tech-Art\Core\Python\Qt\wgWidgets.py line 285: 'PySide2.QtCore.QObject.connect' called with wrong argument types:PySide2.QtCore.QObject
Snip....
self.connect(self.pbBrowse, QtCore.Signal("clicked()"), self.browse)
# Error: TypeError: file D:\Tech-Art\Core\Python\Qt\wgWidgets.py line 284: 'PySide2.QtCore.QObject.connect' called with wrong argument types:
Snip...
If Id do:self.connect(self.pbBrowse, QtCore.Signal("clicked()"), self.browse())it runs but browse() is called right at this point....
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmODFjo%2BzMcM0OzmnDxJ2BeTNZ%2BjNHPQVKtJoEv-w7PT%3D%2BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
----
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAMLepcbyCV4wdGkKVMW62dy4%3DdUJkX%2BfnvR3ToeTGAmDW2NzvQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0v8HxvzVhZj2VkbgeQw%2BapGunHfZ1G0OAc7_WSvTR%2B3Q%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAMLepcYWd9FMd1Re9wOn7dYsROeVPu%2B_WDcWJwQ7cu9KxBCmTw%40mail.gmail.com.
I set up a simple test script:In the end this notation seemed to work for me again:pb.clicked.connect(self.browse)So is that the correct way?
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmODFjo%2BzMcM0OzmnDxJ2BeTNZ%2BjNHPQVKtJoEv-w7PT%3D%2BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
----
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAMLepcbyCV4wdGkKVMW62dy4%3DdUJkX%2BfnvR3ToeTGAmDW2NzvQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0v8HxvzVhZj2VkbgeQw%2BapGunHfZ1G0OAc7_WSvTR%2B3Q%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAMLepcbpjTTfG15yrDANXztugiqHx3OOcXL3S4p1Rq1rmqmK6g%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmODFjo%2BzMcM0OzmnDxJ2BeTNZ%2BjNHPQVKtJoEv-w7PT%3D%2BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
----
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAMLepcbyCV4wdGkKVMW62dy4%3DdUJkX%2BfnvR3ToeTGAmDW2NzvQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0v8HxvzVhZj2VkbgeQw%2BapGunHfZ1G0OAc7_WSvTR%2B3Q%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAMLepcbpjTTfG15yrDANXztugiqHx3OOcXL3S4p1Rq1rmqmK6g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0j2ONAcLYjqGWfu1W6YjcoRBt%3DuC%2BfbXKyhB7sagws_A%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmODFjo%2BzMcM0OzmnDxJ2BeTNZ%2BjNHPQVKtJoEv-w7PT%3D%2BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
----
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAMLepcbyCV4wdGkKVMW62dy4%3DdUJkX%2BfnvR3ToeTGAmDW2NzvQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0v8HxvzVhZj2VkbgeQw%2BapGunHfZ1G0OAc7_WSvTR%2B3Q%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAMLepcbpjTTfG15yrDANXztugiqHx3OOcXL3S4p1Rq1rmqmK6g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0j2ONAcLYjqGWfu1W6YjcoRBt%3DuC%2BfbXKyhB7sagws_A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOC%3DwoNXOqJRH-h3XuYEVYJrXhs38JgSGLeueu0sriUFxA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOC%3DwoNXOqJRH-h3XuYEVYJrXhs38JgSGLeueu0sriUFxA%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAMLepcaxezMvYUZ0HXPdjzY_KMO_U_hD7FGPQQ7O8SiCFnZ8PQ%40mail.gmail.com.
If you go to the issues section in the project on GitHub, search for loadUi and similar keywords to find previous discussions about how to work with Qt Designer files in a cross-compatible way.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAMLepcaxezMvYUZ0HXPdjzY_KMO_U_hD7FGPQQ7O8SiCFnZ8PQ%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAhFo4HGPEuDSOscFY_NG%2B4yZSA6%3DZGLOHbduDFGTGE%2Bg%40mail.gmail.com.
form_class, base_class = uic.loadUiType(ui_file)
how to do it
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/43d2447f-159b-4e48-b9e7-c8e5eb2ed251%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/43d2447f-159b-4e48-b9e7-c8e5eb2ed251%40googlegroups.com.
--Slavomir Kaslev
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAE0o1NveARPR83UD_xgKL6Mfc20PKBC4WLxpK6ThK%2BQVr1rAmA%40mail.gmail.com.
Thanks to Matthew Levine for the initial feature request and Fredrik Averpil for the unwavering support. :)