Reputation: 6171
I'm starting to develop a Qt application in Xubuntu, in fact I started to develop it in Windows 7 and now I'm trying to move to Linux.
The thing is that the Graphical User Interface looks different here in Xubuntu, i.e. there in no border around QGroupBox
.
If I understand it correctly, it seems difference comes from different styles adopted by Qt
in different platforms (Qt is meant to look native, regardless of platform).
I've read this and this and understood the issue might be related to GTK+, but still didn't got the entire point. Doing:
QApplication app(argc, argv);
app.setStyle("fusion");
helps but the issue is still there.
Is it possible no make the GUI identical in Windows and Xubuntu?
Upvotes: 0
Views: 312
Reputation: 4367
Before I start: Qt uses native APIs behind the scenes, which means all but two styles are not portable. This is okay because Qt is meant to look native, regardless of platform. Your groupbox looks funny coming from a Windows background, but to a Xubuntu user, it looks normal and correct.
To your question: Not in the sense you are hoping for. Two styles are completely cross-platform: QWindowsStyle
(Windows classic look, like Win95-2000) and the recent QFusionStyle
.
If you want your program to look exactly the same across platforms, setting both to use Fusion would work. Unfortunately, this would take away the native look for your application on Windows.
Upvotes: 1