[PyQt] QTableWidget in QSplitter

Gregor Kling gregor.kling at its.fh-giessen.de
Sat Mar 22 10:17:34 GMT 2008


Hello,

I have a MainWindow of which the Centralwidget consist of a Splitter
with more Splitters in it.

    self.adminListWidget = QTreeWidget()
    self.adminInfoWidget = QTableWidget()
    self.netInfoWidget = QTableWidget()
    self.domainInfoWidget = QTableWidget()

    self.infoSplitter = QSplitter(Qt.Horizontal)
    self.infoSplitter.addWidget(self.domainInfoWidget)
    self.infoSplitter.addWidget(self.netInfoWidget)

    self.msgSplitter = QSplitter(Qt.Vertical)
    self.msgSplitter.addWidget(self.adminInfoWidget)
    self.msgSplitter.addWidget(self.infoSplitter)

    self.mainSplitter = QSplitter(Qt.Horizontal)
    self.mainSplitter.addWidget(self.adminListWidget)
    self.mainSplitter.addWidget(self.msgSplitter)
    self.setCentralWidget(self.mainSplitter)

Now what I want is, that each QTableWidget expands its QTableWidgetItems
to the actual size
of its respective Splitter.
Does anyone have a clue how to do this ?

thanks
gregor


More information about the PyQt mailing list