Onlu two Qstyle styles in CLion but three in Qt Creator
-
I'm trying to write a Qt project in a C++ Jetbrains IDE CLion instead of offical Qt IDE Qt creator due to my personal preference. According to the output in the first figure, this IDE can definitely compile a Qt project with the Qt I downloaded before, but it has only two Qstyle styles. One is "Windows(looks like WIndows 95 to me)" and another one is "Fusion".
Since that I really wnat to make a WIndows vista style software, which I was very familiar with when I was using PySide6 to write GUI before. In second figure, I compiled another project in Qt creator, but somehow it has three Qstyle styles, including the style "Windows Vista" I desired.
Can someone be kind enough to tell me what settings or parameters I set casued this kind of odd difference in the number of Qstyle styles.
My OS is Windows 11 pro 22h2. And the Qt I downloaded is Qt 6.5 LTS MinGW and MSVC.
I think the Qt environment or tool chains I set for CLion is Qt 6.5.0 MinGW(fig. 3 and fig. 4).
-
@Peter-P-from-Nerv "Windows" and "Fusion" are the built-in styles. "WindowsVista" is a style plugin provided via separate dll.
Available styles are detected at runtime, so missing vista style means your IDE does not deploy plugins to your build directory. You can manually copy the style dll from your Qt installation folder to your build directory or you can use windeployqt to do that for you. You can probably set up a post-build event in your IDE too, so that it runs it for you, although I'm not familiar with CLion enough to tell you how to do that. -
Hi!
Here's something I found based on @Chris-Kawa's explanation: qt gui theme looks old fashioned.
-
@Chris-Kawa Thank you, your explanation is so helpful to me.
-
-
@Abderrahmene_Rayene Thank you, that's really helpful.