Commit 28618df8 authored by Sze Howe Koh's avatar Sze Howe Koh
Browse files

Doc: Suggest an alternative to connections with default params


The new signal-slot connection syntax does not support default
parameters. Lambda functions are a suitable replacement.

Change-Id: I906856104d582c1139c4b78b885566156c7f2f78
Reviewed-by: default avatarOlivier Goffart <ogoffart@woboq.com>
Showing with 4 additions and 0 deletions
...@@ -179,6 +179,10 @@ to QApplication::aboutToQuit(), even though the latter has no arguments. The ...@@ -179,6 +179,10 @@ to QApplication::aboutToQuit(), even though the latter has no arguments. The
functor-based connection will produce a compile-time error: functor-based connection will produce a compile-time error:
\snippet snippets/signalsandslots/signalslotsyntaxes.cpp defaultparams \snippet snippets/signalsandslots/signalslotsyntaxes.cpp defaultparams
To work around this limitation with the functor-based syntax, connect the signal to
a lambda function that calls the slot. See the section above, \l{Making Connections
to Lambda Expressions}.
\section1 Selecting Overloaded Signals and Slots \section1 Selecting Overloaded Signals and Slots
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment