QWizard in Maya

Hi!

For my tool I need to guide user through some setup steps, and a Wizard approach would work best, with user going through a couple pages in order, answering questions.

I tested QWizard in maya, and it works, however there does not seem like it has correct styling. The background is white, but text is bright grey. It looks like Autodesk simply did not bother styling it, likely because it’s not used anywhere in Maya.

So this raises a question - would it be safe to use? Or should I just go with a regular proven QWidget\Window and code my own wizard there?

Here’s the code I tried using it with. I also tried parenting it under Maya window, and the result is exactly the same. It’s slightly adjusted code from PySide docs.

from PySide2.QtGui import *
from PySide2.QtWidgets import *
from PySide2.QtCore import *

def createIntroPage():
    page = QWizardPage()
    page.setTitle("Introduction")

    label = QLabel("This wizard will help you register your copy of Super Product Two.")
    label.setWordWrap(True)

    layout = QVBoxLayout()
    layout.addWidget(label)
    page.setLayout(layout)

    return page

wizard = QWizard()
wizard.addPage(createIntroPage())


wizard.setWindowTitle("Trivial Wizard")
wizard.show()

image

Well, just style it. WizardPage should look pretty much the same even if You run it with Python installed on Your system:
wizard
I never use Maya’s default styles. I override all of it. Maya’s styles look so 2010-ish

Well, styling is not the problem, the problem is reliability. Autodesk did cut some parts of PySide out in previous versions, so if it’s not even styled at all, just got me worried a bit. Wondered if anyone’s been using these at all in their projects.

But It is styled. I showed You the default one without Maya’s styles. Text, buttons and icon are obviously styled

Yes, but that’s the point, it’s not consistent. Those are likely styled just because they are styled globally. Light grey text on white background clearly means that QWizard in particular was not styled at all.

Personally I’ve had issues with WebEngine widgets. During PySide1 it was one widget, then they changed it in PySide2, sure. But in first PySide2 version of maya it simply does not exist at all, neither one of them. It’s just not included. And then it sometimes causes Maya to freeze for some users.

So my question is, again, more about whether other people used QWizard in maya, and if they had any problem with it.

I have used QWizard in 5 tools that I wrote for 2 different companies. I have never experienced any issues with Qt in Maya or in standalone apps in C++ or Python. Also, I haven’t met anyone who did. It is one the best pieces of software ever written. I think You are safe

Well, as I mentioned, there was an issue of QWebEngine simply missing from one version of Maya, and bugging out in others. I could not narrow down the issue, however I was able to reproduce it in VM. Not on any of my bare metal machines.

Thanks for your input on your experience with using QWizard.

If that actually happened you should have just built PySide2 from source and replace existing PySide2. The thing is, as I already said, thousands of software is written with Qt, there is very low chance that there are so massive issues with it.

Building and replacing PySide is not something that I can effectively do for a Python plugin available for purchase and where I have to support different Maya versions. If it was an in-house tool that would not be a problem. I am trying to reduce amount of dependencies to the minimum, and not including compiled version-dependent stuff unless it’s absolutely necessary.

And, as I already said, I am not worried about issues with Qt, it’s Autodesk’s implementation of it that made me worried.