[Qt-interest] Error when building demo application TextFinder

Harri Pasanen grego at mpaja.com
Tue Nov 15 22:01:16 CET 2011


On Tuesday, November 15, 2011 05:18:34 PM George Panagopoulos wrote:
> After some search I found that this is caused by this line of code:
> QMetaObject::connectSlotsByName(TextFinder); wich is suposed to connect
> the pushbutton signal to the corresponding slot.
> 
>  Although it is not clear in the tutorial where this line of code should be
> placed, I placed it inside the constructor and after this line of code:
> ui->setupUi(this);

From the tutorial:

The on_findButton_clicked() slot is called automatically in the uic generated 
ui_textfinder.h file by this line of code:

 QMetaObject::connectSlotsByName(TextFinder);


So that line of code is generated automatically for you, no need to write it 
by hand.

/Harri




More information about the Qt-interest-old mailing list