Hi,
I'm trying to learn how to create and launch a dialog from my main application but I don't find valid tutorial or resources.
Can I have a help please?
Best Regards,
Franco
Hi,
I'm trying to learn how to create and launch a dialog from my main application but I don't find valid tutorial or resources.
Can I have a help please?
Best Regards,
Franco
Franco Amato
It depends on what dialog do you want to have. If some simple warning or question then use QMessageBox's static methods (like QMessageBox::warning()). If it is not enough then either create your own dialog by subclassing QDialog and connecting some buttons or whatever you will have there to accept() and reject() slots of your dialog and then just create object of your class and call QDialog::exec() on it or you can create object of QDialog, set widgets and layouts to it (connect what you want to accept() and reject()) and call exec() on it.
Last edited by faldzip; 6th February 2010 at 22:01.
I would like to be a "Guru"
Useful hints (try them before asking):
- Use Qt Assistant
- Search the forum
If you haven't found solution yet then create new topic with smart question.
I would like to be a "Guru"
Useful hints (try them before asking):
- Use Qt Assistant
- Search the forum
If you haven't found solution yet then create new topic with smart question.
Maybe you can draw a rough sketch of what you need and post it?
Ok I try it.
When I press File->add to list as you can see in the image 1 image1.jpg I would launch a dialog similar to this in the image 2image2.jpg but I'm unable to create the dialog. I would use designer to do faster but I saw that designer only create a *.ui file.
What I have to do with this ui file?
Best Reards,
Franco
Franco Amato
You can use 'uic' to convert 'ui' file to '.h' file. This file contains a class with a function 'setupUi' that will create the ui you designed in QtDesigner.
Bookmarks