03b0948c86
搭建一个框架,但是继承的类QCommonStyle里面的对应的虚函数还有没有重写,和体验感受win和linux系统自带多种风格样式
25 lines
536 B
C++
25 lines
536 B
C++
#include "Examples.h"
|
|
#include <QApplication>
|
|
|
|
#include <QStyleFactory>
|
|
#include <QDebug>
|
|
#include "ExCustomStyle.h"
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
QApplication a(argc, argv);
|
|
|
|
// //使用系统或者自定义的风格
|
|
// QStringList listStyle = QStyleFactory::keys();
|
|
// foreach(QString val, listStyle)
|
|
// qDebug()<<val<<" ";
|
|
// QStyleFactory::create("Fusion");
|
|
// ExCustomStyle* customStyle = new ExCustomStyle;
|
|
// qApp->setStyle(customStyle);
|
|
|
|
Examples w;
|
|
w.show();
|
|
|
|
return a.exec();
|
|
}
|