[PyQt] Scolling problem in Tabbed MDI with different Statusbars

Lukas Hetzenecker lukas.hetzenecker at gmail.com
Fri Sep 24 10:25:14 BST 2010


Hello,

I used a QTabWidget for my implementation of a Tabbed Document Interface.
The widgets in this tabs are QTextBrowsers (or QWebViews). I also have an own 
statusbar for each tab.
If I change the tab of my QTabWidget the QStatusBar is replaced and afterwards 
the content of the QTextBrowser gets scrolled upwards by the height of the 
scrollbar. But this happens sometime after the replace of the status bar.
Is there any workaround for this? Do I really have to remember the old value 
after the change of the current widget and reset it when I get the 
valueChanged singal of the scrollbar?

I tried to disable the updates during the change 
(QWidget.setUpdatesEnabled(False)), but this didn't have the desired effect.

I also attached an simple example for this problem. The problem occurs also if 
i only replace the old statusbar (comment out 
self.statusBar().setParent(None)).

Thanks,
Lukas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.py
Type: text/x-python
Size: 1880 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100924/9f525fea/attachment.py>


More information about the PyQt mailing list