View Full Version : Connect with const char*
grazyna
13th August 2009, 16:23
How can I connect two signals or signal and slot use const char*, e.g:
connect(widget, "valueChange(double), this, "myValueChanged(double));
Doing like this, I have info: Object::connect: No such signal QDoubleSpinBox::alueChanged(double) .
wysota
13th August 2009, 16:42
Use the SIGNAL() and SLOT() macros as the docs advise.
wagmare
14th August 2009, 05:32
QSpinbox default signal of valueChange() is
void QSpinBox::valueChanged ( int i )
void QSpinBox::valueChanged ( const QString & text )
only QString and int value u can connect .. valueChanged(double) is not defined ..
if u want the value in double
either emit() or use QSignalMapper()
wysota
14th August 2009, 07:29
only QString and int value u can connect .. valueChanged(double) is not defined ..
The question is about QDoubleSpinBox :)
aamer4yu
14th August 2009, 15:45
Check the names properly... from your post..
Doing like this, I have info: Object::connect: No such signal QDoubleSpinBox::alueChanged(double) . :rolleyes:
wysota
14th August 2009, 17:44
... or you can just do what I said and forget about the problem.
aamer4yu
14th August 2009, 17:59
definitely,,, what I said was in addition to ur points.. :)
wysota
14th August 2009, 18:13
Ok, but the signal name was correct, it was just missing the macro.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.