08-21-2013 06:42 AM - edited 08-21-2013 09:13 AM
I'm having problems to connect a signal from a SystemProgressDialog object to QThread derived class object.
The connect call it's:
connect(SpinningWheelDialog , SIGNAL(finished(bb::systemystemUiResult::Type) ) , this , SLOT(terminateNotification(bb::systemystemUiResult::Type) ) );
The SpinningWheelDialog object is a SystemProgressDialog;
The class this is the QThread derived one and the connect it's invoked in the constructor of this class.
There are no error both at compilation and runtime, so i suppose the code is correct. It simply doesn't work. When a button is clicked the Dialog disappear but the slot method is not called.
I want the thread to be terminated when the Dialog is closed or destroyed.
Any help is appreciated.
Running OS: 10.1.0.273
API level: 10.1
08-21-2013 07:00 AM
Does your .h file contain this line?
private slots: void terminateNotificaion(....));
08-21-2013 07:16 AM
This is what my .hpp contains:
void terminateNotification(bb::system:ystemUiResult::Type TypeValue);
Is it a problem to declare the slot as "public" ?
08-21-2013 09:36 AM
Just a quick note that you shouldn't be deriving QThread any more (not saying this is the problem)...
08-21-2013 09:41 AM
I take it you've checked the connection...
bool result = connect(SpinningWheelDialog , SIGNAL(finished(bb::systemystemUiResult::Type) ) , this , SLOT(terminateNotification(bb::systemystemUiResult
08-21-2013 12:46 PM
" Where and when is the signal "finished" emitted? "
I don't know smjose i think you should ask it to a BB framework developer. The finished signal is supposed to be called when the Dialog is closed or canceled, i saw the use of this signal here:
I have checked with an if statement if the connect fail (the Q_ASSERT give me problem of freeze).
However the result value is true and indeed there are no error on the console relating signals or slots.