資源簡介
源碼可直接編譯運行,自定義QPushButton樣式,通過選擇背景漸變、邊框、字體、字號、鼠標移入移出切換、點擊態、圓角設置等自動生成樣式code,然后調用setStyleSheet()。
代碼片段和文件信息
/****************************************************************************
**
**?Copyright?(C)?2013?Yigit?Agabeyli.
**
**
**?This?file?may?be?used?under?the?terms?of?the?GNU?General?Public
**?License?version?2.0?as?published?by?the?Free?Software?Foundation
**
**?This?file?is?provided?AS?IS?with?NO?WARRANTY?OF?ANY?KIND?INCLUDING?THE
**?WARRANTY?OF?DESIGN?MERCHANTABILITY?AND?FITNESS?FOR?A?PARTICULAR?PURPOSE.
**
****************************************************************************/
#include?
#include?“mainwindow.h“
int?main(int?argc?char?*argv[])
{
????QApplication?a(argc?argv);
????MainWindow?w;
????w.show();
????
????return?a.exec();
}
- 上一篇:北航歷年機試題自做代碼06-18
- 下一篇:STM8S003模擬串口中斷接收
評論
共有 條評論