[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Where to process results dialog box?
From:       Frederik Himpe <fhimpe () pandora ! be>
Date:       2002-09-29 13:32:37
[Download RAW message or body]

Hi,

I'm rather new to KDE programming, and I have a question.

The application I am developing, shows a dialog box at startup, where
the user can choose to use an existing database, or create a new one.
Now what's the best place to process the results (i.e. create a new
database or open the existing database), when the user presses the OK
button?

Should I do this in the function which called the dialog, something
like:

MyDialog * dialog = new MyDialog();
int ret = dialog->exec();
if (ret == QDialog::Accepted)
{
	// check which option was selected and create or open DB
}


or, should I create a new slot in the dialog's class, connect the
OK button's clicked() signal to this slot, and do the opening or
creation of the DB in this slot, and somehow return the resulting object
to the calling function?

I would appreciate it if someone could show me what would be the best
design practice.

Frederik Himpe

-- 
Linux zeus 2.4.19-rc3 #2 Thu Jul 25 16:00:31 CEST 2002 i586 unknown
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic