On 11/1/12 1:17 PM, Thiago Macieira wrote:
> On quinta-feira, 1 de novembro de 2012 13.03.56, Stephen Chu wrote:
>> I find out what QPrivateSignal is for but it's not clear if lambda can
>> still be used to connect to such private signals.
>>
>> If I connect QTimer::timeout() to a slot that takes no argument, it
>> compiles fine. But when I try to connect to a lambda function without
>> any argument, the results in the mentioned error.
>
> Can you rephrase and/or give us code samples?
>
> "takes no arguments" and "without any argument" are semantically the same in
> English.

This doesn't work (compile error):

        QTimer timer;
        QObject::connect(&timer, &QTimer::timeout, [=](){});

This does:
        
        QTimer timer;
        auto label = new QLabel;
        QObject::connect(&timer, &QTimer::timeout, label, &QWidget::show);


Again. This is using clang 3.1 with QMAKE_CXXFLAGS += -std=c++11

_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to