mainwindow is looking different for different IDE
-
Hi,
I just have a small testproject which is compiled by qtcreator and CLion. The result is looking different even if all is done on the same machine..
qtcreator:

CLion:

it seems that I am missing some settings about Qt themes. While qtcreator is using an own style, CLion is probably using the system theme (KDE).
But where/how can this be set?
Joachim
-
I'd bet CLion doesn't have some env variables for the executable set, so the executable can't find plugins?
@artwaw said in mainwindow is looking different for different IDE:
I'd bet CLion doesn't have some env variables for the executable set, so the executable can't find plugins?
I don't know. That's why I am asking. Using PyCharm, CLions sibbling for Python, the app is looking like in QtCreator. It's different for CLion and PyCharm. The CLion version is not looking like my global settings in KDE but it seems to be more a fallback theme if others are not found.
I am not aware of any settings about themes. There must be a global setting as you can see in KDE but also an individual one?
Deep in my brain I think I can remember about a tool like "global Qt Theme settings" or similar. Is there any Qt package do deal with themes or CSS styles or whatever technique is behind?
It should be possible not to rely on any unknown settings (especially on Windows) on a machine but to use or set (hardcode) the visual look in the project itself! I cannot find any hint about.
-
If you're looking for a uniform styling then QML comes to mind - QtWidgets is designed to follow the system theme.
Plugins locations and how to override them: https://doc.qt.io/qt-6/qt-conf.html && https://doc.qt.io/qt-6/deployment-plugins.html - there is also a note about env var you can set? And others you can examine.
Styles, should you decide to create your own: https://doc.qt.io/qt-6/style-reference.html
Also worth reading https://doc.qt.io/qt-6/linux-deployment.html
Perhaps someone who's more knowledgeable on Linux platform than I am can advise further.
-
M MasterQ has marked this topic as solved on