Re: How to pop up a dialog window?
Brought to you by:
zander
|
From: Thomas Z. <za...@kd...> - 2005-11-14 13:10:35
|
On Mon, Nov 14, 2005 at 08:42:20PM +0800, FCG HU Zhengmao wrote: > hi, > > I am writing my own main window, that is, I used mainFrame = new > JFrame(...) to create my own main window, and used > mainFrame.getContentPane().add(...) to add my own Panel (subclass of the > class generated by UIC, which is a subclass of JPanel) to the main > window. Just an advice; try to create a MainWindow instead for more features (see webpage for more info) > I have a button on the main window, and I would like to pop up a modal > dialog window whenever the button is pressed. > > Should I create the dialog window in QtDesigner as a Widget or Dialog? > And how could I let the dialog pop up? I would advice you create a widget in designer and then set that widget on a SimpleDialog instead of a normal JDialog. see: http://uic.sourceforge.net/api/20/uic/widgets/MainWindow.html http://uic.sf.net/index.phtml?target=product/StandardDialog/view.phtml Cheers! -- Thomas Zander |