QSS精美界面实例

时间:2021-06-09 06:07:54
【文件属性】:

文件名称:QSS精美界面实例

文件大小:930KB

文件格式:RAR

更新时间:2021-06-09 06:07:54

qss,qt

比较漂亮的实例 #include "iconhelper.h" IconHelper* IconHelper::_instance = 0; IconHelper::IconHelper(QObject*): QObject(qApp) { int fontId = QFontDatabase::addApplicationFont(":/image/fontawesome-webfont.ttf"); QString fontName = QFontDatabase::applicationFontFamilies(fontId).at(0); iconFont = QFont(fontName); } void IconHelper::SetIcon(QLabel* lab, QChar c, int size) { iconFont.setPointSize(size); lab->setFont(iconFont); lab->setText(c); } void IconHelper::SetIcon(QPushButton* btn, QChar c, int size) { iconFont.setPointSize(size); btn->setFont(iconFont); btn->setText(c); }


【文件预览】:
stf.dat
QUI.zip

网友评论

  • 很好,刚好用到