Here is, in "gui2/__init__.py":
------------------- ...
def available_heights(): desktop = QCoreApplication.instance().desktop() return map(lambda x: x.height(), map(desktop.availableGeometry, range(desktop.numScreens())))
...
def min_available_height(): return min(available_heights())
class ResizableDialog(QDialog):
def __init__(self, *args, **kwargs): QDialog.__init__(self, *args) self.setupUi(self) nh, nw = min_available_height()-25, available_width()-10 if nh < 0: nh = 800 if nw < 0: nw = 600 nh = min(self.height(), nh) nw = min(self.width(), nw) self.resize(nw, nh) ---------
So when created, the ResizableDialog takes the main (or may be current) display width, but the minimum of the heights of the available displays.
Here is, in "gui2/__init__.py":
-------------------
...
def available_ heights( ): n.instance( ).desktop( ) availableGeomet ry, range(desktop. numScreens( ))))
desktop = QCoreApplicatio
return map(lambda x: x.height(), map(desktop.
...
def min_available_ height( ): heights( ))
return min(available_
...
class ResizableDialog (QDialog) :
def __init__(self, *args, **kwargs):
QDialog. __init_ _(self, *args)
self.setupUi( self) height( )-25, available_ width() -10
self.resize( nw, nh)
nh, nw = min_available_
if nh < 0:
nh = 800
if nw < 0:
nw = 600
nh = min(self.height(), nh)
nw = min(self.width(), nw)
---------
So when created, the ResizableDialog takes the main (or may be current) display width, but the minimum of the heights of the available displays.