I'm using Ubuntu 20.04 and want to write a Python application with a GUI so I decided to go with PySide6 and to make the application look nice I would like to use the Material Design style like in the screenshots here: https://doc.qt.io/qt-5/qtquickcontrols2-material.html.
I found several questions like this one: How should I use Material Design in Pyside6 Application?, but after finding out that nothing is working I read somewhere that QStyleFactory.keys()
would list the available styles that I can use. Turns out the only styles I can use are Windows
and Fusion
. So no wonder I can't use Material
as style. Is there any way I can add this style? Like downloading or installing this specific style somehow?
Be aware that I'm new to working with Qt so if I omitted some crucial detail (because I don't know what detail may be crucial for this) just ask for it.
I also found https://pypi.org/project/qt-material/ but to me it looks a bit off from the "real" Material Design. I don't want to use this.
CodePudding user response:
You should learn the difference between QtWidgets and QtQuick/QML. I guess you want to work with QtWidget. There is no material design solution for QtWidgets provided by Qt company because material design is not primarily targeted for desktop while QtWidgets are. But there is a custom library, very nice IMHO, https://github.com/laserpants/qt-material-widgets