[Qt-interest] Signal Slot not working
Mandeep Sandhu
mandeepsandhu.chd at gmail.com
Mon Jun 21 06:13:03 CEST 2010
On Mon, Jun 21, 2010 at 2:39 AM, Matthias Pospiech
<matthias.pospiech at gmx.de> wrote:
> I have a dll emitting error messages:
>
> void QMicosPolluxController::Error(const char * errorMessage)
> {
> emit errorOccurred(toQString(errorMessage));
> }
>
>
> which is handled in the gui (using the dll)
> void DialogMicosController::connectSignalSlots()
> {
> connect(controller, SIGNAL(errorOccurred(QString)), this,
> SLOT(OnControllerError()));
This line seems to be the problem. You don't have any slot
OnControllerError() ! :)
You'll need to add the QString param here.
HTH,
-mandeep
> }
> void DialogMicosController::OnControllerError(QString error)
> {
> ui->labelError->setText(error);
> }
>
> However the function OnControllerError is never called.
> If I copy all classes to the gui project (thus no dll), the effect is
> exactly the same.
> The SLOT is never called.
>
> Matthias
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
More information about the Qt-interest-old
mailing list