Fix weird scaling of draw map widget
authorWuzzy <Wuzzy2@mail.ru>
Wed, 14 Mar 2018 20:58:24 +0100
changeset 13206 c66ae01ca5a4
parent 13205 c681492df36d
child 13207 d948d39e5da8
Fix weird scaling of draw map widget
QTfrontend/ui/widget/drawmapwidget.h
--- a/QTfrontend/ui/widget/drawmapwidget.h	Wed Mar 14 20:39:14 2018 +0100
+++ b/QTfrontend/ui/widget/drawmapwidget.h	Wed Mar 14 20:58:24 2018 +0100
@@ -24,6 +24,7 @@
 #include <QPushButton>
 #include <QGraphicsView>
 #include <QLabel>
+#include <QSizePolicy>
 
 #include "drawmapscene.h"
 
@@ -64,12 +65,14 @@
                 vbox->addLayout(arLayout);
 
                 lblPoints = new QLabel("0", drawMapWidget);
+                lblPoints->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
                 arLayout->addWidget(lblPoints);
 
                 graphicsView = new DrawMapView(drawMapWidget);
                 graphicsView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
                 graphicsView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
                 graphicsView->setRenderHint(QPainter::Antialiasing, true);
+                graphicsView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum);
                 arLayout->addWidget(graphicsView);
 
                 retranslateUi(drawMapWidget);