Fixed size of imageLabel

--HG--
branch : feature
This commit is contained in:
Valentina Zhuravska 2016-03-18 20:23:42 +02:00
parent a2619d8584
commit 7d8a959c56
2 changed files with 32 additions and 14 deletions

View file

@ -623,6 +623,7 @@ void DialogPatternProperties::InitImage()
ui->imageLabel->setPixmap(QPixmap::fromImage(image));
ui->imageLabel->setContextMenuPolicy(Qt::CustomContextMenu);
ui->imageLabel->setScaledContents(true);
connect(ui->changeImageButton, &QPushButton::clicked, this, &DialogPatternProperties::SetNewImage);
connect(ui->deleteImageButton, &QPushButton::clicked, this, &DialogPatternProperties::DeleteImage);

View file

@ -85,20 +85,6 @@
<property name="leftMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label_6">
<property name="text">
<string>Image</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="imageLabel">
<property name="text">
<string>No image</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="changeImageButton">
<property name="text">
@ -113,6 +99,37 @@
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="imageLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>200</horstretch>
<verstretch>200</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>150</width>
<height>200</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>200</width>
<height>200</height>
</size>
</property>
<property name="text">
<string>No image</string>
</property>
<property name="textFormat">
<enum>Qt::AutoText</enum>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>