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.

   1. Go to the Qt Class List <http://doc.qt.io/qt-5/classes.html>
   2. Find your widget, e.g. QPushButton
   <http://doc.qt.io/qt-5/qpushbutton.html>
   3. See which module it belongs to, e.g. QT += widgets, which in Python
   speak is QtWidgets

[image: Inline images 1]

   - 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, <[email protected]> wrote:

> Op maandag 5 maart 2018 01:03:46 UTC-8 schreef [email protected]:
> > 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 [email protected].
> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBSkCeXhe4yjwP6jqsD_oLAn_97Sukc6SwR75kFmPtJDA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to