Unsolved when setting the style buttons change size
-
Hi.
In the designer created 4 buttons. The buttons are the same size.
In the designer I set the style of the buttons. After that, the buttons change their size under the borders of the text.
How to fix it?ui->button0Page6->setStyleSheet(QString::fromUtf8("background-color: rgb(43, 104, 255); color:white; border: 3px solid white; border-radius: 10px;")); ui->button1Page6->setStyleSheet(QString::fromUtf8("background-color: rgb(43, 104, 255); color:white; border: 3px solid white; border-radius: 10px;")); ui->button2Page6->setStyleSheet(QString::fromUtf8("background-color: rgb(43, 104, 255); color:white; border: 3px solid white; border-radius: 10px;")); ui->button3Page6->setStyleSheet(QString::fromUtf8("background-color: rgb(43, 104, 255); color:white; border: 3px solid white; border-radius: 10px;"));
-
After that, the buttons change their size under the borders of the text.
Can you provide us a better explanation of what is your issue?
-
@KillerSmath said in when setting the style buttons change size:
Can you provide us a better explanation of what is your issue?
Before I change StyleSheet, the ratio of buttons is 1: 1: 1: 1.
After changing StyleSheet the ratio of buttons is 2: 3: 1: 3 (depending on the length of the text in the button). -
Hi,
When using stylesheets, the system style is not used anymore so the rendering will change. So if you want your button to have a specific size, you may have set it yourself.
Can you show a picture of your buttons with and without the style sheet ?
-
@SGaist said in when setting the style buttons change size:
Hi,
When using stylesheets, the system style is not used anymore so the rendering will change. So if you want your button to have a specific size, you may have set it yourself.
Can you show a picture of your buttons with and without the style sheet ?Yes, she is drawn.
How to set the desired property in the style? How is the default? -
@Mikeeeeee said in when setting the style buttons change size:
How to set the desired property in the style?