Skip to content

Commit

Permalink
Merge pull request bitcraze#251 from fredg02/develop_QScrollArea
Browse files Browse the repository at this point in the history
Add QScrollArea to support resizing the main window
  • Loading branch information
ataffanel authored Jan 5, 2017
2 parents 3c6b9c5 + c0b9cbc commit 6f24f19
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 29 deletions.
90 changes: 71 additions & 19 deletions src/cfclient/ui/main.ui
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>872</width>
<height>641</height>
<height>671</height>
</rect>
</property>
<property name="windowTitle">
Expand All @@ -26,7 +26,7 @@
<widget class="QComboBox" name="interfaceCombo">
<property name="minimumSize">
<size>
<width>160</width>
<width>80</width>
<height>0</height>
</size>
</property>
Expand All @@ -39,7 +39,7 @@
<widget class="QPushButton" name="connectButton">
<property name="minimumSize">
<size>
<width>115</width>
<width>60</width>
<height>0</height>
</size>
</property>
Expand All @@ -49,7 +49,7 @@
<widget class="QPushButton" name="scanButton">
<property name="minimumSize">
<size>
<width>115</width>
<width>50</width>
<height>0</height>
</size>
</property>
Expand Down Expand Up @@ -79,7 +79,7 @@
<widget class="QProgressBar" name="linkQualityBar">
<property name="minimumSize">
<size>
<width>120</width>
<width>30</width>
<height>0</height>
</size>
</property>
Expand Down Expand Up @@ -114,13 +114,13 @@
<widget class="QProgressBar" name="batteryBar">
<property name="minimumSize">
<size>
<width>120</width>
<width>30</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<width>100</width>
<height>16777215</height>
</size>
</property>
Expand Down Expand Up @@ -150,23 +150,23 @@
</layout>
</item>
<item>
<widget class="QGroupBox">
<widget class="QGroupBox" name="groupBox">
<layout class="QHBoxLayout" stretch="0,0,1">
<item>
<widget class="QLabel" name="addressLabel">
<property name="text">
<string>Address:</string>
<string>Address:</string>
</property>
</widget>
</item>
<item>
<widget class="HexSpinBox" name="address">
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item>
Expand All @@ -186,10 +186,62 @@
</widget>
</item>
<item>
<widget class="QTabWidget" name="tabs">
<property name="currentIndex">
<number>-1</number>
<widget class="QScrollArea" name="scrollArea">
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<property name="lineWidth">
<number>1</number>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAsNeeded</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>852</width>
<height>529</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<property name="sizeConstraint">
<enum>QLayout::SetNoConstraint</enum>
</property>
<property name="margin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QTabWidget" name="tabs">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="currentIndex">
<number>-1</number>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
Expand All @@ -202,7 +254,7 @@
<x>0</x>
<y>0</y>
<width>872</width>
<height>25</height>
<height>20</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
Expand Down
14 changes: 4 additions & 10 deletions src/cfclient/ui/tabs/flightTab.ui
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</property>
<property name="minimumSize">
<size>
<width>320</width>
<width>160</width>
<height>0</height>
</size>
</property>
Expand All @@ -54,16 +54,10 @@
<widget class="QComboBox" name="flightModeCombo">
<property name="minimumSize">
<size>
<width>150</width>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select what flightmode to use:&lt;/p&gt;&lt;p&gt; * Safe prevents crashing&lt;/p&gt;&lt;p&gt; * Crazy does not prevent crashing :)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
Expand Down Expand Up @@ -236,7 +230,7 @@
</property>
<property name="minimumSize">
<size>
<width>320</width>
<width>160</width>
<height>0</height>
</size>
</property>
Expand Down Expand Up @@ -347,7 +341,7 @@
<widget class="QGroupBox" name="groupBox_4">
<property name="minimumSize">
<size>
<width>320</width>
<width>160</width>
<height>0</height>
</size>
</property>
Expand Down

0 comments on commit 6f24f19

Please sign in to comment.