summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qtabwidget.cpp
diff options
context:
space:
mode:
authorKevin Ottens <ervin@kde.org>2010-04-29 18:45:15 (GMT)
committerBenjamin Poulain <benjamin.poulain@nokia.com>2010-04-29 18:47:08 (GMT)
commita98bb4bf1b7c2b98d5294801ceed910704e2439c (patch)
tree7f7f61369a233dae0b7861626004b748d9558d44 /src/gui/widgets/qtabwidget.cpp
parentdd4bb9811a5fa55bd0dff805e55d72d14bcafd48 (diff)
downloadQt-a98bb4bf1b7c2b98d5294801ceed910704e2439c.zip
Qt-a98bb4bf1b7c2b98d5294801ceed910704e2439c.tar.gz
Qt-a98bb4bf1b7c2b98d5294801ceed910704e2439c.tar.bz2
Set the enabled state on the page when changing the QTabWidget
Enabling/disabling a tab of QTabWidget should also change the state of the widget. Otherwhise it is possible to have a page enabled for a disabled widget. Merge-request: 2354 Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
Diffstat (limited to 'src/gui/widgets/qtabwidget.cpp')
-rw-r--r--src/gui/widgets/qtabwidget.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/widgets/qtabwidget.cpp b/src/gui/widgets/qtabwidget.cpp
index 047a905..4a61935 100644
--- a/src/gui/widgets/qtabwidget.cpp
+++ b/src/gui/widgets/qtabwidget.cpp
@@ -542,6 +542,8 @@ void QTabWidget::setTabEnabled(int index, bool enable)
{
Q_D(QTabWidget);
d->tabs->setTabEnabled(index, enable);
+ if (QWidget *widget = d->stack->widget(index))
+ widget->setEnabled(enable);
}
/*!