Commit bff19014 authored by Gatis Paeglis's avatar Gatis Paeglis
Browse files

doc: remove a note about functor-based connection complexity for overloads


What we had initially:

connect(slider, &QSlider::valueChanged,
        lcd, static_cast<void (QLCDNumber::*)(int)>(&QLCDNumber::display));

was more complex than string-based solution:

connect(slider, SIGNAL(valueChanged(int)),
        lcd, SLOT(display(int)));

But since Qt 5.7 we have qOverload/QOverload:

connect(slider, &QSlider::valueChanged,
        lcd, QOverload<int>::of(&QLCDNumber::display));

connect(slider, &QSlider::valueChanged,
        lcd, qOverload<int>(&QLCDNumber::display));

Which is not complex at all, just a bit different to what Qt developers
are used to.

Task-number: QTBUG-63297
Change-Id: I49f7bf228812ceadc38c601d8a711fd250216b52
Reviewed-by: default avatarMårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: default avatarEdward Welbourne <edward.welbourne@qt.io>
Showing with 0 additions and 4 deletions
......@@ -61,10 +61,6 @@ The table below summarizes their differences.
\li Can connect C++ functions to QML functions
\li Y
\li
\row
\li Selecting an instance of an overloaded signal or slot is...
\li Simple
\li Complex
\endtable
The following sections explain these differences in detail and demonstrate how
......
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