added ui actions

This commit is contained in:
Hendrik Schutter 2020-10-21 17:02:59 +02:00
parent 42165af0f4
commit 0d9c8edc5a
4 changed files with 94 additions and 10 deletions

View File

@ -22,3 +22,8 @@ FORMS += \
qnx: target.path = /tmp/$${TARGET}/bin qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target !isEmpty(target.path): INSTALLS += target
contains(ANDROID_TARGET_ARCH,) {
ANDROID_ABIS = \
armeabi-v7a
}

View File

@ -13,3 +13,13 @@ MainWindow::~MainWindow()
delete ui; delete ui;
} }
void MainWindow::on_horizontalSlider_sliderMoved(int position)
{
ui->progressBar->setValue(100-position);
}
void MainWindow::on_pushButton_clicked()
{
ui->lineEdit->clear();
}

View File

@ -15,6 +15,11 @@ public:
MainWindow(QWidget *parent = nullptr); MainWindow(QWidget *parent = nullptr);
~MainWindow(); ~MainWindow();
private slots:
void on_horizontalSlider_sliderMoved(int position);
void on_pushButton_clicked();
private: private:
Ui::MainWindow *ui; Ui::MainWindow *ui;
}; };

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>800</width> <width>783</width>
<height>600</height> <height>694</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -17,10 +17,10 @@
<widget class="QWidget" name="gridLayoutWidget"> <widget class="QWidget" name="gridLayoutWidget">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>140</x> <x>210</x>
<y>70</y> <y>50</y>
<width>281</width> <width>401</width>
<height>251</height> <height>543</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
@ -40,10 +40,16 @@
<number>90</number> <number>90</number>
</property> </property>
<property name="verticalSpacing"> <property name="verticalSpacing">
<number>6</number> <number>29</number>
</property> </property>
<item row="4" column="0"> <item row="4" column="0">
<widget class="QCheckBox" name="checkBox"> <widget class="QCheckBox" name="checkBox">
<property name="minimumSize">
<size>
<width>0</width>
<height>40</height>
</size>
</property>
<property name="text"> <property name="text">
<string>CheckBox</string> <string>CheckBox</string>
</property> </property>
@ -51,6 +57,12 @@
</item> </item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QLineEdit" name="lineEdit"> <widget class="QLineEdit" name="lineEdit">
<property name="minimumSize">
<size>
<width>0</width>
<height>40</height>
</size>
</property>
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
@ -58,9 +70,18 @@
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="enabled">
<bool>true</bool>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>40</height>
</size>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>9</pointsize> <pointsize>20</pointsize>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
@ -69,10 +90,23 @@
</widget> </widget>
</item> </item>
<item row="6" column="0"> <item row="6" column="0">
<widget class="QDateEdit" name="dateEdit"/> <widget class="QDateEdit" name="dateEdit">
<property name="minimumSize">
<size>
<width>0</width>
<height>40</height>
</size>
</property>
</widget>
</item> </item>
<item row="7" column="0"> <item row="7" column="0">
<widget class="QSlider" name="horizontalSlider"> <widget class="QSlider" name="horizontalSlider">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -80,6 +114,12 @@
</item> </item>
<item row="5" column="0"> <item row="5" column="0">
<widget class="QComboBox" name="comboBox"> <widget class="QComboBox" name="comboBox">
<property name="minimumSize">
<size>
<width>0</width>
<height>40</height>
</size>
</property>
<item> <item>
<property name="text"> <property name="text">
<string>First</string> <string>First</string>
@ -94,6 +134,12 @@
</item> </item>
<item row="3" column="0"> <item row="3" column="0">
<widget class="QPushButton" name="pushButton"> <widget class="QPushButton" name="pushButton">
<property name="minimumSize">
<size>
<width>0</width>
<height>40</height>
</size>
</property>
<property name="text"> <property name="text">
<string>PushButton</string> <string>PushButton</string>
</property> </property>
@ -101,6 +147,24 @@
</item> </item>
<item row="8" column="0"> <item row="8" column="0">
<widget class="QProgressBar" name="progressBar"> <widget class="QProgressBar" name="progressBar">
<property name="minimumSize">
<size>
<width>0</width>
<height>40</height>
</size>
</property>
<property name="sizeIncrement">
<size>
<width>0</width>
<height>2</height>
</size>
</property>
<property name="baseSize">
<size>
<width>0</width>
<height>1</height>
</size>
</property>
<property name="value"> <property name="value">
<number>24</number> <number>24</number>
</property> </property>
@ -114,7 +178,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>800</width> <width>783</width>
<height>23</height> <height>23</height>
</rect> </rect>
</property> </property>