Re: Newbie Question
Ashley Winters <[email protected]>
| Newsgroups | gmane.comp.kde.devel.perl |
|---|---|
| Message-ID | <[email protected]> |
All you need to do is create any widget you want to display, without giving a "parent" argument, and it will be a toplevel window. Here's a quick example: use Qt; $a = Qt::Application \@ARGV; $b = Qt::PushButton "Show window", undef; # undef parent $b->show; $w = Qt::Widget; # no parent again! $a->setMainWidget($b); $w->connect($b, SIGNAL "clicked()", SLOT "show()"); $a->exec; Or, from the command-line: perl -MQt -e '$a = Qt::Application \@ARGV; $b = Qt::PushButton "Show", undef; show $b; $w = Qt::Widget; setMainWidget $a $b; $w->connect($b, SIGNAL "clicked()", SLOT "show()"); $a->exec' Ashley Winters --- Joe Claborn <[email protected]> wrote: > I'm starting to get the hang of perlQT - but tonight I'm stumped. > > I have an application that is a main-window. There is one place > where I want > to be able to open up another window (like a popup window) to display > some > text and a picture. > > How do I open up another window? If I'm missing something obvious - > please > point me in the right direction. > > Thanks, > -- > Joe Claborn > [email protected] > 254-829-2448 > > _______________________________________________ > Kde-perl mailing list > [email protected] > https://mail.kde.org/mailman/listinfo/kde-perl __________________________________ Do you Yahoo!? Yahoo! Small Business $15K Web Design Giveaway http://promotions.yahoo.com/design_giveaway/