qt practice problem 1 record

qt practice title records
refer to other people’s codes, thanks to open source experts.
Color query
Insert picture description here

http://tools.jb51.net/static/colorpicker/?

https://github.com/aeagean

https://fontawesome.com/v4.7.0/cheatsheet/

Insert picture description here

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
Insert picture description here
Insert picture description here

Insert picture description here

widgetTitle

Insert picture description here
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));

Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here

2

Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here

page1

Insert picture description here
Insert picture description here

page2

Insert picture description here
Insert picture description here

page3

Insert picture description here
Insert picture description here

page4

Insert picture description here
Insert picture description here

Insert picture description here
Insert picture description here

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

Insert picture description here

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));

Insert picture description here
Insert picture description here

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);
Insert picture description here

initPage1LeftMain

pixCharMain << 0xf030 << 0xf03e << 0xf247;
Insert picture description here

Guess you like

Origin blog.csdn.net/wowocpp/article/details/113931423