Commit a2c7a35f authored by Damien Naudet's avatar Damien Naudet
Browse files

sizehint for the roiwidget

parent 2199911a
...@@ -58,10 +58,9 @@ class RectRoiWidget(Qt.QWidget): ...@@ -58,10 +58,9 @@ class RectRoiWidget(Qt.QWidget):
# support multiple ROIs then batch them # support multiple ROIs then batch them
super(RectRoiWidget, self).__init__(parent) super(RectRoiWidget, self).__init__(parent)
roiToolBar = roiManager.toolBar(rois=['rectangle'], self.__roiToolBar = roiToolBar = roiManager.toolBar(rois=['rectangle'],
options=['show']) options=['show'])
roiToolBar.setMovable(False) roiToolBar.setMovable(False)
roiToolBar.addSeparator()
topLayout = Qt.QVBoxLayout(self) topLayout = Qt.QVBoxLayout(self)
...@@ -137,6 +136,9 @@ class RectRoiWidget(Qt.QWidget): ...@@ -137,6 +136,9 @@ class RectRoiWidget(Qt.QWidget):
roiManager.sigRoiMoved.connect(self.__roiMoved, roiManager.sigRoiMoved.connect(self.__roiMoved,
Qt.Qt.QueuedConnection) Qt.Qt.QueuedConnection)
def sizeHint(self):
return Qt.QSize(self.__roiToolBar.sizeHint().width() + 10, 0)
def __discardRoi(self, checked): def __discardRoi(self, checked):
self.__roiManager.clear() self.__roiManager.clear()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment