mirror of
https://github.com/wassname/sloth.git
synced 2026-07-17 11:33:03 +08:00
fix issue with initial size of central widget
This commit is contained in:
+7
-5
@@ -40,22 +40,22 @@ class MainWindow(QMainWindow):
|
||||
###___________________________________________________________________________________________
|
||||
def setupGui(self):
|
||||
self.ui = uic.loadUi("labeltool.ui", self)
|
||||
self.ui.show()
|
||||
|
||||
self.view = GraphicsView(self)
|
||||
self.setCentralWidget(self.view)
|
||||
|
||||
self.scene = AnnotationScene(self)
|
||||
self.view = GraphicsView(self)
|
||||
self.view.setSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.MinimumExpanding)
|
||||
self.view.setScene(self.scene)
|
||||
self.setCentralWidget(self.view)
|
||||
|
||||
self.buttonarea = ButtonArea()
|
||||
# TODO make this configurable/settable via command line option
|
||||
self.buttonarea.load("std_config.py")
|
||||
self.ui.dockAnnotationButtons.setWidget(self.buttonarea)
|
||||
self.connect(self.buttonarea, SIGNAL("stateChanged(state)"), self.scene.setMode)
|
||||
self.buttonarea.stateChanged.connect(self.scene.setMode)
|
||||
|
||||
self.treeview = AnnotationTreeView()
|
||||
self.treeview.setAlternatingRowColors(True)
|
||||
self.treeview.setSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.Preferred)
|
||||
self.ui.dockInformation.setWidget(self.treeview)
|
||||
|
||||
## create action group for tools
|
||||
@@ -66,6 +66,8 @@ class MainWindow(QMainWindow):
|
||||
self.ui.actionMask):
|
||||
self.toolActions.addAction(action)
|
||||
|
||||
self.ui.show()
|
||||
|
||||
## connect action signals
|
||||
self.connectActions()
|
||||
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>656</width>
|
||||
<height>26</height>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuFile">
|
||||
@@ -105,7 +105,7 @@
|
||||
</widget>
|
||||
<widget class="QDockWidget" name="dockInformation">
|
||||
<attribute name="dockWidgetArea">
|
||||
<number>2</number>
|
||||
<number>1</number>
|
||||
</attribute>
|
||||
<widget class="QWidget" name="dockInformationWidgetContents"/>
|
||||
</widget>
|
||||
|
||||
Reference in New Issue
Block a user