Understanding Qt - 2 | start making GUI app with Qt.
New Project
Qt Application
Widgect Application
> next , next , > Finish
Search " PushBotton " in filter of widjet bar ( left side below the top corner.
1. ) Adding " CSS Style in PushButton.
|) Right click on " Push botton " , select edit style Sheet.
||) Right click on background interface & then select ' edit style Sheet
Now we have to write to code a/c to need
i.e.
QPushButton{
border: 2px solid gray;border radius: 10px;padding: 0 8px;background: yellow;
}
# if we want to do changes in particualar button then write code using method |)
but in ||) method changes wiill be applied for every button.
||) another way to do it is by : specifying the button name/number , to do specific changes.
i.e.
QPushButton#pushButton {
border: 2px solid gray;
border radius: 10px;
padding: 0 8px;
background: yellow;
}
just like " pushButton " we can also add "List Widget" & write below alog with
previously wirtten code in main " edit style sheet "
i.e.
QPushButton#pushButton {
border: 2px solid gray;
border radius: 10px;
padding: 0 8px;
background: yellow;
}
QPushButton {
border: 0px;
padding: 0 8px;
background:white;
color:red;
}
QListWidget {
background:red;
}
Comments
Post a Comment