QApplication::setStyle(QStyleFactory::create("plastique"));
QStyle * QStyleFactory::create ( const QString & key ) [static]
使用QApplication::setStyle可以改變應用程序的外觀, QStyleFactory中提供了幾種經典的外觀.
The valid keys can be retrieved using the keys() function. Typically they include "windows", "motif", "cde", "plastique" and "cleanlooks". Depending on the platform, "windowsxp", "windowsvista" and "macintosh" may be available. Note that keys are case insensitive.
另外還可以創建自己的外觀風格, 這個是相當的復雜, 然后使用如 QApplication::setStyle(new NorwegianWoodStyle) 來進行加載使用外觀. Demo中的widgets/styles例子創建了一個新的NorwegianWoodStyle外觀.