From 6352f7a619c86c6c8f8b56e97b51419a204f76dc Mon Sep 17 00:00:00 2001 From: stv Date: Tue, 17 Jan 2006 08:34:42 +0000 Subject: [PATCH] Correct tab order for dialog control buttons (from left/top to right/bottom or in reversed order) --- src/Qtx/QtxDialog.cxx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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 ); } /*! -- 2.39.2