[Interest] New connection syntax
Igor Mironchik
igor.mironchik at gmail.com
Tue Dec 16 09:33:51 CET 2014
Hi,
On Tue, 16 Dec 2014 10:55:03 +0300, Dmitry Volosnykh
<dmitry.volosnykh at gmail.com> wrote:
> Igor, have you read "New Signal Slot Syntax in Qt 5" article
> (http://qt-project.org/wiki/New_Signal_Slot_Syntax)? It might shed light
> on some of your >questions.
Thanks for your reply. But this article didn't answer on my questions.
>
> On Tue, Dec 16, 2014 at 10:49 AM, Igor Mironchik
> <igor.mironchik at gmail.com> wrote:
>> Hi guys,
>>
>> Qt has cool new syntax now. But some things doesn't support it yet.
>>
>> For example look at QMenu::addAction. There is now overload with
>> PointerToMemberFunction.
>>
>> And I have two questions:
>>
>> Is it planned to add this support,
>>
>> and how can I use PointerToMemberFunction in my own widgets?
>>
>> I.e. I want to have, for example, next method in my widget:
>>
>> Something * addSomething( QObject * receiver, PointerToMemberFunction
>> method );
>>
>> Where is PointerToMemberFunction declared, what should I include?
I read sources a little and found that PointerToMembeerFunction is just
for documentation, and real work is done with QtPrivate::FunctionPointer.
As is clear from name of namespace QtPrivate, this is not good idea to use
it in my code. And better to not provide such functionality. Am I right?
--
Best Regards,
Igor Mironchik.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20141216/e4d04a8c/attachment.html>
More information about the Interest
mailing list