Using Qt Designer file inside KDevelop project.

Helen Muller helen20020918 at yahoo.co.uk
Tue Oct 8 20:09:02 UTC 2002


 
I appreciate for Harald Fernengel and Victor Roeder's reply.  I have worked out my problem finally. Indeed, "mydlg.exec()" works,(Thank you so much)  However, I'm doubt in a point.  The popup dialog window can only be active when the parent is the main interface(or frame). If I want to click a button on the popup window, and again let it pop out a small window. It doesn't work. As you said, I should declare the parent, I'm sorry that I don't know exactly how to do it. The sentense you wrote can not be simply added into the code. Could you indicate it more clearly?   

I added the following sentence into the "baseclase.cpp"

connect( PushButton1, SIGNAL( clicked() ), this, SLOT( Slotshow() ) );

The popup window is displayed, but seems that it response a bit slowly. 

Best regards,

Helen

 
 
 Victor_Röder wrote: Sorry for the prematured mail :-) Hi, Helen! 1) You have to declare the parent (your main window for example), etc. (see documentation) when you create your dialog object. <snip> QDialog::QDialog ( QWidget * parent = 0, const char * name = 0, bool modal = FALSE, WFlags f = 0 ) Constructs a dialog called name, with parent parent. </snip> 2) You have to call mydlg.exec()
I am working on a GUI application under KDE3/Qt environment for a few weeks. However, I'm still a beginer.  In my applicaiton, a simple function doesn't work. :(  I want to click a button, then popup a dialog window. I've built the dialog window file using Qt designer, and integrated it into KDE Project. In the slot by connecting the "click button" signal, I wrote code:

creatddlg mydlg;

mydlg.show();

createdlg is the baseclass name of the dialog. But it didn't be actived when I launch the application. Anyone can kindly give me a clue or advice? Thanks heaps!





---------------------------------
Get a bigger mailbox -- choose a size that fits your needs.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20021008/d69cba7e/attachment.html>


More information about the KDevelop-devel mailing list