qt - QPushButton dimensions change when Stylesheet is apllied -
when apply style sheet on qpushbutton dimensions change. style sheet declaration.
qpushbutton { background-color: rgb(175, 187, 199); color: black; border-width: 1px; border-top: 1px solid white; border-left: 1px solid white; border-right: 1px solid grey; border-bottom: 1px solid grey; border-style: solid; border-radius: 5; padding: 3px; padding-left: 5px; padding-right: 5px; font: 16px; font-weight: bold; }
image - before applying style sheet
image - after applying style sheet
how keep original button size?
based on comment below question: try add qualifier:
mydialog qpushbutton { background-color: rgb(175, 187, 199); color: black; border-width: 1px; border-top: 1px solid white; border-left: 1px solid white; border-right: 1px solid grey; border-bottom: 1px solid grey; border-style: solid; border-radius: 5; padding: 3px; padding-left: 5px; padding-right: 5px; font: 16px; font-weight: bold; }
this should merged default style sheet (not override whole thing) , work on buttons need alter.
see documentation.
Comments
Post a Comment