Unlock instant, AI-driven research and patent intelligence for your innovation.

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

Inactive Publication Date: 2015-01-21
SHANGHAI SPACEFLIGHT ELECTRONICS & COMM EQUIP RES INST
View PDF4 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In the interface development process, it is usually necessary to beautify the control every time a control is created. When developing a complex interface composed of many controls, the amount of code required for beautification increases significantly, and the beautification codes for the same type of control are all different. Basically the same, high code redundancy

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Qss style sheet based interface beautifying method
  • Qss style sheet based interface beautifying method

Examples

Experimental program
Comparison scheme
Effect test

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...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a qss style sheet based interface beautifying method. The method comprises the following steps: S1, adding a qss file to Qt engineering, and describing the properties of each activeX through the qss file under different operation states according to the grammatical norms of the style sheet; S2, adding a qrc file to the Qt engineering, and enabling the qrc to appoint all resource files including the qss file used in the Qt engineering; S3, setting a main QT thread in a source program, and loading the property of each active under different operation states through the qss file.

Description

technical field [0001] The invention relates to the field of embedded technology, in particular to an interface beautification method based on a qss style sheet. [0002] Background technique [0003] Qt is a widely used cross-platform C++ application development framework. In the interface development process, it is usually necessary to beautify the control every time a control is created. When developing a complex interface composed of many controls, the amount of code required for beautification increases significantly, and the beautification codes for the same type of control are all different. Basically the same, code redundancy is high. [0004] Contents of the invention [0005] The present invention provides a method for beautifying the interface based on the qss style sheet aiming at the above-mentioned deficiencies in the prior art. The present invention is realized through the following technical solutions: [0006] A method for beautifying an interface bas...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/44
Inventor 高宇刘成芳辜鹏
Owner SHANGHAI SPACEFLIGHT ELECTRONICS & COMM EQUIP RES INST