[Solved]what is the usage of Q_PRIVATE_SLOT?
-
wrote on 1 Dec 2015, 03:16 last edited by opengpu2 12 Feb 2015, 10:47
what is the usage of Q_PRIVATE_SLOT? is it useless?
-
wrote on 1 Dec 2015, 05:36 last edited by TheBadger 12 Jan 2015, 05:46
I did not know about it, but after some searching and reading up I came across this link: http://kunalmaemo.blogspot.co.za/2010/09/using-signalslot-with-private.html
So in short if you use opaque or d-pointers the Q_PRIVATE_SLOT is used to connect a slot to a method in the private member class.
Edit: Look at the links that @Ratzz gave below rather for better information.
From there you would see that for Qt > 5 with C++11 it is useless -
I did not know about it, but after some searching and reading up I came across this link: http://kunalmaemo.blogspot.co.za/2010/09/using-signalslot-with-private.html
So in short if you use opaque or d-pointers the Q_PRIVATE_SLOT is used to connect a slot to a method in the private member class.
Edit: Look at the links that @Ratzz gave below rather for better information.
From there you would see that for Qt > 5 with C++11 it is uselesswrote on 1 Dec 2015, 05:48 last edited by@TheBadger thank you
-
wrote on 1 Dec 2015, 09:27 last edited by
Once your problem is solved please use the Topic Tools button to mark as Solved.
Thank you!
1/6