[vlc-commits] Qt: firstrun: use QDialogButtonsBox

Francois Cartegnie git at videolan.org
Tue Jul 19 22:45:19 CEST 2011


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Jul 19 22:43:53 2011 +0200| [4871fc3ebd954c8fb1f3db8d0bfd34d3bd471703] | committer: Francois Cartegnie

Qt: firstrun: use QDialogButtonsBox

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4871fc3ebd954c8fb1f3db8d0bfd34d3bd471703
---

 modules/gui/qt4/dialogs/firstrun.cpp |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/modules/gui/qt4/dialogs/firstrun.cpp b/modules/gui/qt4/dialogs/firstrun.cpp
index c97835c..4e3487f 100644
--- a/modules/gui/qt4/dialogs/firstrun.cpp
+++ b/modules/gui/qt4/dialogs/firstrun.cpp
@@ -27,6 +27,7 @@
 #include <QGroupBox>
 #include <QCheckBox>
 #include <QLabel>
+#include <QDialogButtonBox>
 #include <QPushButton>
 #include <QSettings>
 
@@ -106,11 +107,12 @@ void FirstRun::buildPrivDialog()
     optionsLayout->addWidget( checkbox2, line++, 0 );
 #endif
 
-    QPushButton *ok = new QPushButton( qtr( "Save and Continue" ) );
+    QDialogButtonBox *buttonsBox = new QDialogButtonBox( this );
+    buttonsBox->addButton( qtr( "Save and Continue" ), QDialogButtonBox::AcceptRole );
 
-    gLayout->addWidget( ok, 2, 2 );
+    gLayout->addWidget( buttonsBox, 2, 0, 2, 3 );
 
-    CONNECT( ok, clicked(), this, save() );
-    ok->setFocus();
+    CONNECT( buttonsBox, accepted(), this, save() );
+    buttonsBox->setFocus();
 }
 



More information about the vlc-commits mailing list