I get it! Thank you, I wasn't trying to use classes. I know that when I learned how to use Qt, I was told to use classes, but I forgot to do that this time around. You are great Marcus!
On Tue, Nov 7, 2017 at 1:49 AM, Marcus Ottosson <[email protected]> wrote: > Have a look at this example. > > class MyWindow(QtWidgets.QDialog): > def __init__(self, parent=None): > super(MyWindow, self).__init__(parent) > self.setWindowTitle("My Window Title") > > Where QDialog is subclassed from QWidget, and also has this member. > > > On 7 November 2017 at 06:37, Tom Whitzer <[email protected]> wrote: > >> Thank you! I am getting an error that QWidget is not defined. I am >> guessing I am initializing the window incorrectly. >> >> On Tue, Nov 7, 2017 at 1:28 AM, Marcus Ottosson <[email protected]> >> wrote: >> >>> I think you misread QWidgets for QWidget, which means every instance of >>> a QWidget has setWindowTitle(). >>> >>> - http://doc.qt.io/qt-5/qwidget.html#windowTitle-prop >>> >>> >>> >>> On 7 November 2017 at 06:25, Tom Whitzer <[email protected]> wrote: >>> >>>> Hey Everyone, >>>> >>>> Beginner question, I am trying to get better working with Qt, but it >>>> has been a while since I learned basics of using it. I am trying to create >>>> a simple window at the moment with a title. I have seen online that I >>>> should use QWidgets.setWindowTitle(), but Maya keeps telling me that module >>>> doesn't exist. I don't seem to see any modules that would change a window >>>> title in the Qt.py file. How would I go about creating a Title? >>>> >>>> Best, >>>> Tom >>>> >>>> -- >>>> 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/ms >>>> gid/python_inside_maya/b9cd92d9-5cd3-4705-ac50-8ec181885091% >>>> 40googlegroups.com >>>> <https://groups.google.com/d/msgid/python_inside_maya/b9cd92d9-5cd3-4705-ac50-8ec181885091%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> 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/ms >>> gid/python_inside_maya/CAFRtmOAee5GyvLzQ9nVk-DMfaY3ZRj9O2xpi >>> 7MJ0sEDzq_sRaQ%40mail.gmail.com >>> <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAee5GyvLzQ9nVk-DMfaY3ZRj9O2xpi7MJ0sEDzq_sRaQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> ------------------------------------ >> Tom Whitzer >> http://www.tomwhitzer.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 [email protected]. >> To view this discussion on the web visit https://groups.google.com/d/ms >> gid/python_inside_maya/CAKGAQ_AMtVmcoZ5DaFxEXJe77r6bP2%3DJfH >> Uu1vhMrxE90MHJRA%40mail.gmail.com >> <https://groups.google.com/d/msgid/python_inside_maya/CAKGAQ_AMtVmcoZ5DaFxEXJe77r6bP2%3DJfHUu1vhMrxE90MHJRA%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> >> 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/CAFRtmOCYZ3odzJgEOvCefwonF5J- > 0jBjyYJ-0QvHn%2BG43bnJUQ%40mail.gmail.com > <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOCYZ3odzJgEOvCefwonF5J-0jBjyYJ-0QvHn%2BG43bnJUQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- ------------------------------------ Tom Whitzer http://www.tomwhitzer.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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAKGAQ_A8GMji5bSnkdONG%3DmO8RGz_9djkRP9vuENE33heeY0bg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
