What does "of" when used with QOverload do?
-
Hi all,
I just setup my first QTimer successfully, but I was left with a question when i used this line of code:
connect(timer, &QTimer::timeout, this, QOverload<>::of(&NfcId::getIdFromSerial));What exactly does the
QOverload<>::ofsection of this do? I'm overloading something but its not very clear from Qt's usage guide, and why isofthere?thanks in advance.
-
Hi all,
I just setup my first QTimer successfully, but I was left with a question when i used this line of code:
connect(timer, &QTimer::timeout, this, QOverload<>::of(&NfcId::getIdFromSerial));What exactly does the
QOverload<>::ofsection of this do? I'm overloading something but its not very clear from Qt's usage guide, and why isofthere?thanks in advance.
-
Hi all,
I just setup my first QTimer successfully, but I was left with a question when i used this line of code:
connect(timer, &QTimer::timeout, this, QOverload<>::of(&NfcId::getIdFromSerial));What exactly does the
QOverload<>::ofsection of this do? I'm overloading something but its not very clear from Qt's usage guide, and why isofthere?thanks in advance.
@ActivateTheDroids said in What does "of" when used with QOverload do?:
why is
ofthere?Because of limitations in C++11.
If you have C++14 support, then you don't need
of: https://doc.qt.io/qt-5/signalsandslots-syntaxes.html#selecting-overloaded-signals-and-slots