From: stv Date: Tue, 17 Jan 2006 08:34:42 +0000 (+0000) Subject: Correct tab order for dialog control buttons (from left/top to right/bottom or in... X-Git-Tag: T_Before_Join_BR-D5-38-2003~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6352f7a619c86c6c8f8b56e97b51419a204f76dc;p=modules%2Fgui.git Correct tab order for dialog control buttons (from left/top to right/bottom or in reversed order) --- diff --git a/src/Qtx/QtxDialog.cxx b/src/Qtx/QtxDialog.cxx index bf827df57..347479e55 100755 --- a/src/Qtx/QtxDialog.cxx +++ b/src/Qtx/QtxDialog.cxx @@ -236,7 +236,7 @@ void QtxDialog::Area::layoutButtons() center.append( it.current() ); } - delete layout(); + delete layout(); QBoxLayout* buttonLayout = 0; if ( myOrientation == Qt::Vertical ) @@ -267,6 +267,22 @@ void QtxDialog::Area::layoutButtons() buttonLayout->addStretch( 1 ); } } + + QWidgetList wids; + if ( layout() ) + { + for ( QLayoutIterator it = layout()->iterator(); it.current(); ++it ) + { + if ( !it.current()->widget() ) + continue; + + if ( QApplication::reverseLayout() ) + wids.prepend( it.current()->widget() ); + else + wids.append( it.current()->widget() ); + } + } + Qtx::setTabOrder( wids ); } /*!