[Qt-interest] MDI sub window too small

velociraptor Genjix aphidia at hotmail.com
Tue Oct 19 05:44:30 CEST 2010


Hey,
I keep getting the message:QWidget::setMinimumSize: (/QMdi::ControlLabel) Negative sizes (-1,-1) are not possible
In my main MDI window, I am showing the MDI sub window by means of:  self.showMaximised()   # show main MDI window  child = MyCustomWidget()   # same as MdiTable* child = new MdiTable(); for those that don't know python here  self.mdiArea.addSubWindow(child)  child.show()
Here the sub window widget:
class MyCustomWidget(QtGui.QWidget):    def __init__(self):        super(MdiTable, self).__init__()
        self.setAttribute(QtCore.Qt.WA_DeleteOnClose)        self.resize(100,100)
       # this block is commented        """self.setWindowTitle('Table titilonius')        b = QtGui.QTextEdit()
        box = QtGui.QHBoxLayout()        box.addWidget(b)
        self.setLayout(box)"""
The created MdiSubWindow has 0,0 size, and I have to resize it. If I uncomment that block with the HBoxLayout then it has a decent size but I still get the error message.
Awaiting your comments :) Thanks! 		 	   		  



More information about the Qt-interest-old mailing list