Как закруглить края кнопки в Qt Designer
Не могу закруглить кнопку и поле ввода в Qt Designer. Уже пробовал записывать border-radius в файл стилей, но это не помогает а больше способов не знаю, через код это делать не хочется.
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>600</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>800</width>
<height>600</height>
</size>
</property>
<property name="contextMenuPolicy">
<enum>Qt::NoContextMenu</enum>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="windowTitle">
<string>Вычисление BMI</string>
</property>
<widget class="QWidget" name="centralwidget">
<widget class="QLabel" name="background">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>801</width>
<height>601</height>
</rect>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap>background.png</pixmap>
</property>
</widget>
<widget class="QLabel" name="heigth">
<property name="geometry">
<rect>
<x>280</x>
<y>110</y>
<width>401</width>
<height>61</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>17</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);</string>
</property>
<property name="text">
<string>Введите свой рост:</string>
</property>
</widget>
<widget class="QLabel" name="main_text">
<property name="geometry">
<rect>
<x>210</x>
<y>50</y>
<width>391</width>
<height>51</height>
</rect>
</property>
<property name="font">
<font>
<family>Myanmar Text</family>
<pointsize>35</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);
font: 35pt "Myanmar Text";</string>
</property>
<property name="text">
<string>Вычисление BMI</string>
</property>
</widget>
<widget class="QLineEdit" name="input_heigth">
<property name="geometry">
<rect>
<x>230</x>
<y>170</y>
<width>331</width>
<height>31</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border-radius: 100;</string>
</property>
</widget>
<widget class="QLabel" name="weigth">
<property name="geometry">
<rect>
<x>280</x>
<y>240</y>
<width>401</width>
<height>61</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>17</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);</string>
</property>
<property name="text">
<string>Введите свой вес:</string>
</property>
</widget>
<widget class="QLineEdit" name="input_weigth">
<property name="geometry">
<rect>
<x>230</x>
<y>300</y>
<width>331</width>
<height>31</height>
</rect>
</property>
</widget>
<widget class="QPushButton" name="answer">
<property name="geometry">
<rect>
<x>290</x>
<y>370</y>
<width>211</width>
<height>41</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>14</pointsize>
</font>
</property>
<property name="cursor">
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);
background-color: rgb(120, 183, 140);
border-radius: 25px;
border: 2px solid #094065;</string>
</property>
<property name="text">
<string>Узнать BMI</string>
</property>
</widget>
<widget class="QLineEdit" name="input_weigth_2">
<property name="geometry">
<rect>
<x>230</x>
<y>460</y>
<width>331</width>
<height>31</height>
</rect>
</property>
</widget>
</widget>
</widget>
<resources/>
<connections/>
</ui>
Ответы (1 шт):
Автор решения: S. Nick
→ Ссылка
color: rgb(255, 255, 255);
background-color: rgb(120, 183, 140);
border-radius: 20px; /* <---- 20px */
border: 2px solid #094065;

