qt practice title records
refer to other people’s codes, thanks to open source experts.
Color query
http://tools.jb51.net/static/colorpicker/?
https://fontawesome.com/v4.7.0/cheatsheet/
Topic analysis
Layout analysis: The overall widget is a vertical layout,
Overall
width 870
height 600
Above is widgetTitle ------ QWidget, ---- fixed height of 70,
below is stackedWidget ------ QStackedWidget
widgetTitle
labIco
labTitle
widgetTop
horizontalSpacer
widgetMenu
1
http://www.fontawesome.com.cn/cheatsheet/
void UIDemo08::initForm()
{
this->setProperty("form", true);
this->setProperty("canMove", true);
this->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint);
IconHelper::Instance()->setIcon(ui->labIco, QChar(0xf073), 30);
IconHelper::Instance()->setIcon(ui->btnMenu_Min, QChar(0xf068));
IconHelper::Instance()->setIcon(ui->btnMenu_Max, QChar(0xf067));
IconHelper::Instance()->setIcon(ui->btnMenu_Close, QChar(0xf00d));
2
page1
page2
page3
page4
Do it again from the beginning-list the process and the problems encountered
Do it again from the beginning-list the process and the problems encountered
fontawesome
IconHelper::Instance()->setIcon(ui->labIco, QChar(0xf073), 30);
IconHelper::Instance()->setIcon(ui->btnMenu_Min, QChar(0xf068));
IconHelper::Instance()->setIcon(ui->btnMenu_Max, QChar(0xf067));
IconHelper::Instance()->setIcon(ui->btnMenu_Close, QChar(0xf00d));
initLeftConfig
lost — 0xf249 0xf247
pixCharConfig << 0xf031 << 0xf036 << 0xf249 << 0xf055 << 0xf05a << 0xf249;
void IconHelper::setStyle(QWidget *widget,
QList<QToolButton *> btns,
QList pixChar,
quint32 iconSize,
quint32 iconWidth,
quint32 iconHeight,
const QString &type, int borderWidth, const QString &borderColor,
const QString &normalBgColor, const QString &darkBgColor,
const QString &normalTextColor, const QString &darkTextColor)
IconHelper::Instance()->setStyle(ui->widgetLeftMain, btnsMain, pixCharMain, 15, 35, 25, “left”, 4);
IconHelper::Instance()->setStyle(ui->widgetLeftConfig, btnsConfig, pixCharConfig, 10, 20, 15, “left”, 5);
initPage1LeftMain
pixCharMain << 0xf030 << 0xf03e << 0xf247;