PDA

View Full Version : What's the practical difference between QMessageBox, QDialogButtonBox, and QDialog ??



ahmadka
10th June 2010, 20:42
I'm new to Qt and am trying to develop my first ever app in Qt ... I was trying to figure out whats the practical difference between QMessageBox, QDialogButtonBox, and QDialog (and also any other similar variants) .. ? The official documentation just lists all the technical aspects regarding these classes, but I was wondering, whats the difference between them ? For what purpose are each of these suited to ? Also, can anyone post any screenshots of any class implementations running on the N900 (like show separate pictures of onscreen QMessageBox, QDialogButtonBox, and QDialog running instances), so one can physically see what are the differences between them in terms of layout and capabilities ?

tbscope
11th June 2010, 06:15
One of the things that makes a great programmer is the ability for hem or her to find the information himself or herself. And if that's not possible, create test scenario's to study behaviour or techniques.
And if that's not possible, ask smart questions.

You did neither.

The difference is clearly explained in the documentation.
Now, the documentation is in English and you might not understand it all correctly. Then say so.

A dialog is a basic dialog, it has no content.
A dialog button box is a widget that contains a series of buttons that you can place on a dialog
A message box is a dialog containing a message (label), and icon and some buttons.
A file dialog is a dialog for opening and saving files, it's a dialog with contents
...

You see, that's all explained in the documentation ;-)