Does anyone here know some good tutorials/info about PyQt for maya 2017/2018. The only tutorials I find are several years old. I'm struggling to find information.
--
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/d9200442-ff49-419f-9c73-2fc867111d3e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Mon, Mar 5, 2018, 10:03 PM <daniel...@gmail.com> wrote:Does anyone here know some good tutorials/info about PyQt for maya 2017/2018. The only tutorials I find are several years old. I'm struggling to find information.Aside from a few api changes in Qt5, not too much has changed in the core information. The older tutorials still hold up well. At least that's what people are telling me on my YouTube training vids.Have you found the older tutorials to be difficult to follow in the newest Maya releases?
--
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/d9200442-ff49-419f-9c73-2fc867111d3e%40googlegroups.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/CAPGFgA2CuBdF41EWrXLDwz1uVGPXqLjV1g2C4cGd_280xTOS1w%40mail.gmail.com.
Like Justin said, anything for Qt4 (Maya 2016 and below) is applicable to Qt5 (Maya 2017 and above) as well.Then there are newer features, exclusive to Qt5, like QML for which there's the QML Book and YouTube series like the one by VoidRealm. Along with maybe a handful of open source examples, such as Cool Retro Term, Phoenix and LiriOS, and some commercial examples like Melodics, the Ableton Push's on-device GUI. And of course my own Pyblish :)
On 5 March 2018 at 09:05, Justin Israel <justin...@gmail.com> wrote:
On Mon, Mar 5, 2018, 10:03 PM <daniel...@gmail.com> wrote:Does anyone here know some good tutorials/info about PyQt for maya 2017/2018. The only tutorials I find are several years old. I'm struggling to find information.Aside from a few api changes in Qt5, not too much has changed in the core information. The older tutorials still hold up well. At least that's what people are telling me on my YouTube training vids.Have you found the older tutorials to be difficult to follow in the newest Maya releases?
--
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/d9200442-ff49-419f-9c73-2fc867111d3e%40googlegroups.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/CAPGFgA2CuBdF41EWrXLDwz1uVGPXqLjV1g2C4cGd_280xTOS1w%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/CAFRtmOCv3drWjsVOf64foq5t1JRtToBL1hJXSDftsU%2BN7PEL4g%40mail.gmail.com.
@joe that’s a good point. Simply swapping QtGui
for QtWidgets
isn’t enough to cover all cases either, as not everything was moved.
I think the most challenging bit of the bulk of the tutorials being for Qt4 is that the code no longer 'just works' when you run it. The API's are pretty much the same, but the widget-based functionality now comes from the qtwidgets module instead of qtgui. It makes perfect sense for someone versed in qt, but I've had a heck of a time with it with my students, even after demonstrating a full PySide to PySide2 conversion. The fact that the tutorials use qtgui causes a stumbling block for newer coders, who might be learning python at the same time as PySide.
Explaining this to an experienced python developer is pretty painless, even if they're new to Qt, because they're not struggling with the concepts of modules which expose functionality. From my years of teaching, that was always the hardest concept to help students grasp. It's quite a leap to go from writing scripts in the script editor that do a thing to writing a library that can then be called, and 'import mylib' comes across in many cases as a bit of magic early on.
So no, I don't think the tutorials themselves are the issue (I know so many people that have benefited from Justin's YouTube series). I think it's more the lack of content for "here's how to get started in PySide2, here's what's going on, and if you want to know more, here's these other references. Keep in mind they use the old Qt4 model, so you'll need to be mindful of what classes they use and map those to the new modules". Similar to Justin's introduction to the PySide docs, but with an emphasis on Qt5/PySide2 and how to find which module a given class is part of. On that note, last I checked, the docs weren't there yet for PySide2, which is yet another challenge to new learners.
I also think (and I've been guilty of this) that a lot of instructors have moved to using pyside more than the old maya ui commands. This is great for getting folks versed in the UI tech they'd be using in-industry, but PySide with its multiple modules assumes an understanding of the more basic principles of Python that might not have developed yet for those learning it.
I could be wrong, but that's my impression from working with students.
On Mon, 5 Mar 2018 at 10:43 PM, Marcus Ottosson <konstr...@gmail.com> wrote:
Like Justin said, anything for Qt4 (Maya 2016 and below) is applicable to Qt5 (Maya 2017 and above) as well.Then there are newer features, exclusive to Qt5, like QML for which there's the QML Book and YouTube series like the one by VoidRealm. Along with maybe a handful of open source examples, such as Cool Retro Term, Phoenix and LiriOS, and some commercial examples like Melodics, the Ableton Push's on-device GUI. And of course my own Pyblish :)
On 5 March 2018 at 09:05, Justin Israel <justin...@gmail.com> wrote:
On Mon, Mar 5, 2018, 10:03 PM <daniel...@gmail.com> wrote:Does anyone here know some good tutorials/info about PyQt for maya 2017/2018. The only tutorials I find are several years old. I'm struggling to find information.Aside from a few api changes in Qt5, not too much has changed in the core information. The older tutorials still hold up well. At least that's what people are telling me on my YouTube training vids.Have you found the older tutorials to be difficult to follow in the newest Maya releases?
--
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/d9200442-ff49-419f-9c73-2fc867111d3e%40googlegroups.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/CAPGFgA2CuBdF41EWrXLDwz1uVGPXqLjV1g2C4cGd_280xTOS1w%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/CAFRtmOCv3drWjsVOf64foq5t1JRtToBL1hJXSDftsU%2BN7PEL4g%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/CAM33%3Da66kSPHeaeTPEO6dmgsvmxurriL-2aOZSMLeK%3DR1tVdHQ%40mail.gmail.com.
@joe that’s a good point. Simply swapping
QtGui
forQtWidgets
isn’t enough to cover all cases either, as not everything was moved.
On 5 March 2018 at 11:12, Joe Weidenbach <scd...@gmail.com> wrote:
I think the most challenging bit of the bulk of the tutorials being for Qt4 is that the code no longer 'just works' when you run it. The API's are pretty much the same, but the widget-based functionality now comes from the qtwidgets module instead of qtgui. It makes perfect sense for someone versed in qt, but I've had a heck of a time with it with my students, even after demonstrating a full PySide to PySide2 conversion. The fact that the tutorials use qtgui causes a stumbling block for newer coders, who might be learning python at the same time as PySide.
Explaining this to an experienced python developer is pretty painless, even if they're new to Qt, because they're not struggling with the concepts of modules which expose functionality. From my years of teaching, that was always the hardest concept to help students grasp. It's quite a leap to go from writing scripts in the script editor that do a thing to writing a library that can then be called, and 'import mylib' comes across in many cases as a bit of magic early on.
So no, I don't think the tutorials themselves are the issue (I know so many people that have benefited from Justin's YouTube series). I think it's more the lack of content for "here's how to get started in PySide2, here's what's going on, and if you want to know more, here's these other references. Keep in mind they use the old Qt4 model, so you'll need to be mindful of what classes they use and map those to the new modules". Similar to Justin's introduction to the PySide docs, but with an emphasis on Qt5/PySide2 and how to find which module a given class is part of. On that note, last I checked, the docs weren't there yet for PySide2, which is yet another challenge to new learners.
I also think (and I've been guilty of this) that a lot of instructors have moved to using pyside more than the old maya ui commands. This is great for getting folks versed in the UI tech they'd be using in-industry, but PySide with its multiple modules assumes an understanding of the more basic principles of Python that might not have developed yet for those learning it.
I could be wrong, but that's my impression from working with students.
On Mon, 5 Mar 2018 at 10:43 PM, Marcus Ottosson <konstr...@gmail.com> wrote:
Like Justin said, anything for Qt4 (Maya 2016 and below) is applicable to Qt5 (Maya 2017 and above) as well.Then there are newer features, exclusive to Qt5, like QML for which there's the QML Book and YouTube series like the one by VoidRealm. Along with maybe a handful of open source examples, such as Cool Retro Term, Phoenix and LiriOS, and some commercial examples like Melodics, the Ableton Push's on-device GUI. And of course my own Pyblish :)
On 5 March 2018 at 09:05, Justin Israel <justin...@gmail.com> wrote:
On Mon, Mar 5, 2018, 10:03 PM <daniel...@gmail.com> wrote:Does anyone here know some good tutorials/info about PyQt for maya 2017/2018. The only tutorials I find are several years old. I'm struggling to find information.Aside from a few api changes in Qt5, not too much has changed in the core information. The older tutorials still hold up well. At least that's what people are telling me on my YouTube training vids.Have you found the older tutorials to be difficult to follow in the newest Maya releases?
--
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/d9200442-ff49-419f-9c73-2fc867111d3e%40googlegroups.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/CAPGFgA2CuBdF41EWrXLDwz1uVGPXqLjV1g2C4cGd_280xTOS1w%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/CAFRtmOCv3drWjsVOf64foq5t1JRtToBL1hJXSDftsU%2BN7PEL4g%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/CAM33%3Da66kSPHeaeTPEO6dmgsvmxurriL-2aOZSMLeK%3DR1tVdHQ%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/CAFRtmOD-%2B8GQCXNJx-Vwog47yQM1ssoEja1abACykos1KvoH-A%40mail.gmail.com.
I think so.
The most common error you should find is..
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'QtGui' has no attribute 'QPushButton'
Where QPushButton
is some widget you are trying to instantiate. When that happens, try replacing QtGui
with QtWidgets
.
Then, to gain a better understanding of where a widget is before getting an error, you can look it up.
QT += widgets
, which in Python speak is QtWidgets
Hope it helps!
--
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/32972c5c-8af6-452f-a568-3e798254d3e7%40googlegroups.com.
I think so.
The most common error you should find is..
Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: module 'QtGui' has no attribute 'QPushButton'
Where
QPushButton
is some widget you are trying to instantiate. When that happens, try replacingQtGui
withQtWidgets
.Then, to gain a better understanding of where a widget is before getting an error, you can look it up.
- Go to the Qt Class List
- Find your widget, e.g. QPushButton
- See which module it belongs to, e.g.
QT += widgets
, which in Python speak isQtWidgets
- For an automated conversion, see https://github.com/rferrazz/pyqt4topyqt5
- For cross-compatible code with PyQt4, PyQt5, PySide and PySide2, see https://github.com/mottosso/Qt.py (disclaimer: my project).
Hope it helps!
On 6 March 2018 at 05:05, <daniel...@gmail.com> wrote:
Op maandag 5 maart 2018 01:03:46 UTC-8 schreef daniel...@gmail.com:
> Does anyone here know some good tutorials/info about PyQt for maya 2017/2018. The only tutorials I find are several years old. I'm struggling to find information.
Thank you so much for all the info. As an artist who knows python and wants to learn Qt5 and Pyside2 it all seems a little confusing. I'll google introduction to pyside2 and see what I can find. Justin, do you think your "PyQt4 UI Development for Maya" is still a good start for PyQt5 and Pyside2? I really liked both of your "Python For Maya Artists" tutorials a few years ago.
--
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/32972c5c-8af6-452f-a568-3e798254d3e7%40googlegroups.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/CAFRtmOBSkCeXhe4yjwP6jqsD_oLAn_97Sukc6SwR75kFmPtJDA%40mail.gmail.com.
import maya.cmds as mc
MAYA_VER = int(mc.about(version=True))
if MAYA_VER <= 2016:
from PySide.QtGui import QWidget, QMainWindow, QDialog, QAbstractButton, QIcon
from shiboken import wrapInstance
import pysideuic
else:
from PySide2.QtGui import QIcon
from PySide2.QtWidgets import QWidget, QMainWindow, QDialog, QAbstractButton
from shiboken2 import wrapInstance
import pyside2uic as pysideuic