[Qt-interest] Margins in QTabWidget

Stan Warford Stan.Warford at pepperdine.edu
Sat May 2 07:23:16 CEST 2009


Hello all,

I cannot figure out how to change the margins for the children of a  
QTabWidget. For example, in Qt Creator I have:

MainWindow (QMainWindow)
     centralWidget (QWidget)
         tabWidget (QTabWidget)
             tab (QWidget)
                 textEdit (QTextEdit)
             tab_2 (QWidget)

I want to shrink the space around textEdit inside the tab pane. There  
appear to be no margin settings in ui designer that will do this. I  
have tried manipulating all sorts of bounding rectangles within

ui->tabWidget->childrenRect()
ui->tabWidget->childrenRegion()
ui->tab->childrenRect()
ui->tab->childrenRegion()
etc., etc.

with a bunch of QRect move methods, but nothing seems to have any  
effect on the margins.

Thanks for any help.

Stan



More information about the Qt-interest-old mailing list