Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
doc_src_stylesheet.cpp File Reference

(d6bdc5e9b6bcc9324c506c194bc168cdb6ec1da7)

Go to the source code of this file.

Classes

class  MyPushButton
 [25] More...
 
class  ns::MyPushButton
 

Namespaces

namespace  ns
 [26]
 

Functions

qApp setStyleSheet ("QPushButton { color: white }")
 [21]
 
myPushButton setStyleSheet ("* { color: blue }")
 [21]
 
myPushButton setStyleSheet ("color: blue")
 [22]
 
qApp setStyleSheet ("QGroupBox { color: red; } ")
 [23]
 
qApp setStyleSheet ("QGroupBox, QGroupBox * { color: red; }")
 [24]
 
MyPushButton QPushButton setStyleSheet ("MyPushButton { background: yellow; }")
 
qApp setStyleSheet ("ns--MyPushButton { background: yellow; }")
 
qApp setStyleSheet ("QLineEdit { background-color: yellow }")
 [32]
 
myDialog setStyleSheet ("QLineEdit#nameEdit { background-color: yellow }")
 [89]
 
nameEdit setStyleSheet ("background-color: yellow")
 [90]
 
nameEdit setStyleSheet ("color: blue; background-color: yellow")
 [91]
 
nameEdit setStyleSheet ("color: blue;" "background-color: yellow;" "selection-color: yellow;" "selection-background-color: blue;")
 [92]
 
nameEdit setProperty ("mandatoryField", true)
 

Variables

QLineEditnameEdit = new QLineEdit(this)
 [93]
 
QLineEditemailEdit = new QLineEdit(this)
 
QSpinBoxageSpinBox = new QSpinBox(this)
 

Function Documentation

◆ setProperty()

nameEdit setProperty ( "mandatoryField" ,
true  )

◆ setStyleSheet() [1/12]

myPushButton setStyleSheet ( "* { color: blue }" )

[21]

[22]

◆ setStyleSheet() [2/12]

nameEdit setStyleSheet ( "background-color: yellow" )

[90]

[91]

◆ setStyleSheet() [3/12]

myPushButton setStyleSheet ( "color: blue" )

[22]

[23]

◆ setStyleSheet() [4/12]

nameEdit setStyleSheet ( "color: blue; background-color: yellow" )

[91]

[92]

◆ setStyleSheet() [5/12]

nameEdit setStyleSheet ( "color: blue;" "background-color: yellow;" "selection-color: yellow;" "selection-background-color: blue;" )

[92]

[93]

◆ setStyleSheet() [6/12]

MyPushButton QPushButton setStyleSheet ( "MyPushButton { background: yellow; }" )

◆ setStyleSheet() [7/12]

qApp setStyleSheet ( "ns--MyPushButton { background: yellow; }" )

References QStyleOption::initFrom(), opt, and QStyle::PE_Widget.

+ Here is the call graph for this function:

◆ setStyleSheet() [8/12]

qApp setStyleSheet ( "QGroupBox { color: red; } " )

[23]

[24]

◆ setStyleSheet() [9/12]

qApp setStyleSheet ( " QGroupBox,
QGroupBox *{ color:red;}"  )

[24]

[25]

◆ setStyleSheet() [10/12]

myDialog setStyleSheet ( "QLineEdit { background-color: yellow }" )

[32]

[88]

[89]

◆ setStyleSheet() [11/12]

myDialog setStyleSheet ( "QLineEdit#nameEdit { background-color: yellow }" )

[89]

[90]

◆ setStyleSheet() [12/12]

qApp setStyleSheet ( "QPushButton { color: white }" )

[21]

Variable Documentation

◆ ageSpinBox

QSpinBox* ageSpinBox = new QSpinBox(this)

Definition at line 101 of file doc_src_stylesheet.cpp.

◆ emailEdit

QLineEdit* emailEdit = new QLineEdit(this)

Definition at line 98 of file doc_src_stylesheet.cpp.

◆ nameEdit

QLineEdit* nameEdit = new QLineEdit(this)

[93]

[95]

Definition at line 95 of file doc_src_stylesheet.cpp.