Qss style sheet based interface beautifying method
A style sheet and interface technology, applied in the embedded field, can solve the problems of increased code volume and high code redundancy, and achieve the effects of reducing code volume, reducing code coupling, and enhancing code readability
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0025] figure 2 In the shown embodiment 1, the qss style sheet method is used to uniformly beautify the button controls in the interface. The specific process is:
[0026] Add a qss file to the Qt project, and edit it using the grammar specification of the style sheet, for example: QPushButton{...}, QPushButton:hover{...}, QPushButton:pressed{...}, respectively for the button normal , the mouse moves to the button, and the mouse presses the button to set the button appearance style of these three states; add a qrc file to the Qt project, and add the edited qss file to the qrc file; at the main entrance of the Qt project Add the function of reading the file in the function, read the qss file name into the QString string variable, and then call setStyleSheet(QString str) to load the style of the button control.
[0027] The present invention can separate the function code of the interface from the beautification code, and does not need to care about how to beautify the interf...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 