aboutsummaryrefslogtreecommitdiffstats
path: root/docbook
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-02-13 11:18:30 -0800
committerGerald Combs <gerald@wireshark.org>2015-02-13 19:19:11 +0000
commitf85d1c801d0fd49950a13bf134102ff04582f17d (patch)
treed70e50e633dae35ab2d483c6f6bcf36e50e152aa /docbook
parent3e3fc9fc5eb16dd08641c9080eed35073acc1aca (diff)
WSUG: Add a note about dialogs vs windows.
Change-Id: I38d7838db2be59af8a31d94b7cafeeef62698215 Reviewed-on: https://code.wireshark.org/review/7105 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'docbook')
-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