From ce261d6197d319d67f7b275813449f36ce42a730 Mon Sep 17 00:00:00 2001 From: zautrix Date: Mon, 21 Feb 2005 13:34:06 +0000 Subject: default button fixes --- (limited to 'microkde/kdialogbase.cpp') diff --git a/microkde/kdialogbase.cpp b/microkde/kdialogbase.cpp index d1f7630..801094a 100644 --- a/microkde/kdialogbase.cpp +++ b/microkde/kdialogbase.cpp @@ -23,8 +23,10 @@ KDialogBase::KDialogBase( QWidget *parent, const char *name, bool modal, KDialog( parent, name, modal ) { init( caption, buttonMask, user1, user2 ); - if (findButton( defaultButton ) ) - (findButton( defaultButton ) )->setFocus(); + if (findButton( defaultButton ) ) { + (findButton( defaultButton ) )->setFocus(); + (findButton( defaultButton ) )->setDefault( true ); + } } @@ -74,6 +76,7 @@ void KDialogBase::init( const QString &caption, int buttonMask, if ( buttonMask & Ok ) { mOkButton = new QPushButton( i18n("Ok"), this ); connect( mOkButton, SIGNAL( clicked() ), SLOT( slotOk() ) ); + mOkButton->setDefault( true ); } else { mOkButton = 0; } -- cgit v0.9.0.2