why i can't ever set Material theme for Qt.Quick.Window?
-
Environments :
Windows10
Qt Creator 9.0.2
Based on Qt 6.4.2 (MSVC 2019, x86_64)
Qt Quick Designer plugin 9.0.2
pySide6
python 3.11the documentation says like use
ApplicationWindow { visible: true Material.theme: Material.Dark Material.accent: Material.Purple }
okay i got it. but when i tried to do it, Qt Creator gives me error
This type (ApplicationWindow) is not supported as a root element by Qt Design Studio.
and if i try
Window { visible: true Material.theme: Material.Dark Material.accent: Material.Purple }
it only change the accent and some button styles but Background is still white and not all changing the theme.
i tried to find any information about it but i can't find any solutions anywhere.i can't find qtquickcontrols2.conf, so i just made one and run, it didn't work either.
adding QT_QUICK_CONTROLS_MATERIAL_THEME="Dark" on main.py, didn't worki can't find any proper approaches.
can someone explain me how to set the Material theme on Qt.Quick(with Qt Design Studio) or at least link me document or explanation of proper way to apply it? -
You could use ApplicationWindow in the App.qml file that defines the main entry point fo your application.
In this case the wysiwyg editor will not support the file anymore, but since it only contains boiler plate code, this should not be an issue.