summaryrefslogtreecommitdiff
path: root/docbook/wsdg_src/WSDG_chapter_userinterface.asciidoc
diff options
context:
space:
mode:
Diffstat (limited to 'docbook/wsdg_src/WSDG_chapter_userinterface.asciidoc')
-rw-r--r--docbook/wsdg_src/WSDG_chapter_userinterface.asciidoc11
1 files changed, 11 insertions, 0 deletions
diff --git a/docbook/wsdg_src/WSDG_chapter_userinterface.asciidoc b/docbook/wsdg_src/WSDG_chapter_userinterface.asciidoc
index 4226034a58..f9fff2a330 100644
--- a/docbook/wsdg_src/WSDG_chapter_userinterface.asciidoc
+++ b/docbook/wsdg_src/WSDG_chapter_userinterface.asciidoc
@@ -87,6 +87,17 @@ Dialogs that work with capture file information shouldn't close just because the
capture file closes. Subclassing `WiresharkDialog` as described above can make
it easier to persist across capture files.
+When you create a window with a row of standard ``OK'' and ``Close'' buttons at
+the bottom using Qt Creator you will end up with a subclass of QDialog. This is
+fine for traditional modal dialogs, but many times the ``dialog'' needs to behave
+like a QWindow instead.
+
+Modal dialogs should be constructed with `QDialog(parent)`. Modeless dialogs
+(windows) should be constructed with `QDialog(NULL, Qt::Window)`. Other
+combinations (particularly `QDialog(parent, Qt::Window)`) can lead to odd and
+inconsistent behavior. Again, subclassing `WiresharkDialog` will take care of
+this for you.
+
===== Strings
If you're using GLib string functions or plain old C character array idioms in