Login - what is the right way?

Joe Claborn <[email protected]>
Newsgroups gmane.comp.kde.devel.perl
Message-ID <[email protected]>
I've got my main application written and working. Now I need to add a 'login 
screen' that opens when they start the application. If they login correctly, 
then my  application's main window should be shown.

I got it working by building a login screen, then in the OK button click event  
I validate the login, and if it is good, then (still in the button click 
event) I do
   # Now start the real app.
    my $a = Qt::Application(\@ARGV);
    my $w = MMInternal::QTClient::UI;
    $a->setMainWidget($w);
    $w->show;
    exit $a->exec;

This works - but is seems weird to me to have the main application started 
from inside the OK button click.  Is this the best way - or is there a better 
way to do it?

Thanks,

-- 
Joe Claborn
[email protected]
254-829-2448
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.