[Qt-interest] Problems with Signal and Slots [QLineEdit]
Thiago Macieira
thiago at kde.org
Mon Mar 22 14:13:06 CET 2010
Em Segunda-feira 22 Março 2010, às 13:56:23, Aaron Lewis escreveu:
> Hi,
> I got such warnings:
> QMetaObject::connectSlotsByName: No matching signal for
> on_escapeLine(QString)
If you're using connectSlotsByName (which the .ui file produces), you HAVE to
pay attention to slot naming.
It's on_<objectname>_<signalname>.
If you name anything starting with "on_", you have to do it the whole way. And
don't connect manually, like you did below. Just leave the the automatic
connection to take place.
Or don't name your slots starting with "on_".
> Sample Code:
> //Declare
> private slots:
> void on_escapeLine(const QString&);
>
> //In Construct function
>
> connect(ui->escapeLine,SIGNAL(textEdited(QString)),this,SLOT(on_escapeLine(
> QString)));
>
> Note: escapeLine is a QLineEdit.
>
> Any ideas will appreciate ;-)
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Senior Product Manager - Nokia, Qt Development Frameworks
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100322/7b311779/attachment.bin
More information about the Qt-interest-old
mailing list