views:

74

answers:

1
+1  Q: 

Qt style control

I have a qt app that is defaulting to looking like windows 98. Is there some way to get it to look better? I like the appearance it has on GNOME or KDE, but even getting it to look like windows XP would be an improvement.

+4  A: 

Take a look at QApplication::setStyle:

http://doc.trolltech.com/4.6/qapplication.html#setStyle-2

The following code should make your application appear in Windows XP style:

QStyle* xpStyle = new QWindowsXPStyle();
QApplication::setStyle(xpStyle);

or alternately:

QApplication::setStyle("windowsxp");

See also:

http://doc.trolltech.com/4.6/style-reference.html

RA