vlc | branch: master | Francois Cartegnie <[email protected]> | Thu Sep 23 21:07:19 2010 +0200| [e7e4692fcc4d12494d0896553f686c7d5b9a8b58] | committer: Francois Cartegnie
Qt: make help dialog use standard buttons > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e7e4692fcc4d12494d0896553f686c7d5b9a8b58 --- modules/gui/qt4/dialogs/help.cpp | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/gui/qt4/dialogs/help.cpp b/modules/gui/qt4/dialogs/help.cpp index a5d77a9..fce2509 100644 --- a/modules/gui/qt4/dialogs/help.cpp +++ b/modules/gui/qt4/dialogs/help.cpp @@ -55,17 +55,18 @@ HelpDialog::HelpDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf ) setWindowRole( "vlc-help" ); setMinimumSize( 350, 300 ); - QGridLayout *layout = new QGridLayout( this ); + QVBoxLayout *layout = new QVBoxLayout( this ); QTextBrowser *helpBrowser = new QTextBrowser( this ); helpBrowser->setOpenExternalLinks( true ); helpBrowser->setHtml( qtr(I_LONGHELP) ); - QPushButton *closeButton = new QPushButton( qtr( "&Close" ) ); - closeButton->setDefault( true ); + QDialogButtonBox *closeButtonBox = + new QDialogButtonBox( QDialogButtonBox::Close, Qt::Horizontal, this ); + closeButtonBox->setFocus(); - layout->addWidget( helpBrowser, 0, 0, 1, 0 ); - layout->addWidget( closeButton, 1, 3 ); + layout->addWidget( helpBrowser ); + layout->addWidget( closeButtonBox ); - BUTTONACT( closeButton, close() ); + CONNECT( closeButtonBox, rejected(), this, close() ); readSettings( "Help", QSize( 500, 450 ) ); } _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
