QSS-Skin-Builder
(thanks to the open source expert)
This project is better,
Taking into account the character encoding problem when using qt creator and visual studio at the same time.
Study carefully
https://github.com/satchelwu/QSS-Skin-Builder
F:\qt_work\qt5_code_plus_jack\app_example\QSS-Skin-Builder-master
Code analysis:
The periphery is a QUIWidget qui;
class QUIWidget: public QDialog, there is no corresponding ui file
This part is included:
QUICreator *creator = new QUICreator;
class QUICreator: public QMainWindow, there is a corresponding ui file quicreator.ui
qss_skin_creater_app
then modify the code of main.cpp
#include "quiwidget.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QUIWidget qui;
qui.show();
return a.exec();
}
Create an other directory, create an empty form directory and an empty
demo directory at the same time: there are files appinit.cpp and appinit.h under the demo directory.
Add a head.h file
Add network
layout
verticalLayout1
widgetMain
verticalLayout2
widgetTitle
horizontalLayout4
labIco
labTitle
widgetMenu
horizontalLayout
btnMenu
btnMenu_Min
btnMenu_Max
btnMenu_Close
widget
verticalLayout3
verticalLayout1:
QSize QUIWidget::sizeHint() const
{
return QSize(600, 450);
}
this->resize(900, 750);
Stage 1
Give the current project a new name
F:\qt_work\qt5_code_plus_jack\app_example\qss_skin_app
F:\qt_work\qt5_code_plus_jack\app_example\qss_skinA_app
qss_skinA_app interface
QUICreator is a QMainWindow class, I did not expect QMainWindow can also be included as a child window.
Main window area menu
Main window
11
22
1,
First place 4 buttons
2,tabWidget
Layout
3
4 Device panel
Below the form directory:
class frmDevice: public QWidget{ } with ui file
labTemp -------------- labCurrentTemp
labDamp -------------- labCurrentDamp
4