开发者

Qt style control

开发者 https://www.devze.com 2022-12-23 13:11 出处:网络
I have a qt app that is defaulting to looking like windows 98. Is there some way to g开发者_运维百科et it to look better? I like the appearance it has on GNOME or KDE, but even getting it to look like

I have a qt app that is defaulting to looking like windows 98. Is there some way to g开发者_运维百科et 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.


Take a look at QApplication::setStyle:

http://doc.qt.digia.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.qt.digia.com/4.6/style-reference.html

0

精彩评论

暂无评论...
验证码 换一张
取 消