call member function with TExec()

From: Jochen Thaeder <thaeder_at_kip.uni-heidelberg.de>
Date: Tue, 24 Jan 2006 10:19:26 +0100


Hi,

I want to catch mouse events in a canvas of my GUI. The GUI is implemented as one class using QtRoot in a complex framework.

Im trying to call a member function of a class with the TExec() method within the same class. I don't want to use macro, because I've to use some member variables out of my Class.

Int_t myClass::myFunction() {

    TQtWidget *HistWidget = tQtWidgetGUI; ...

    HistWidget->GetCanvas()->AddExec("ex","myExec()"); ...

}

void myClass::myExec() {

    printf("foo");
}

But the only thing I get is:

 Error: Function myExec() is not defined in current scope FILE:(tmpfile) LINE:1  Possible candidates are...
 filename line:size busy function type and name

I already looked on the "exec*.C" examples, but they didn't really help me.

What am I doing wrong??

 Thanks

    Jochen

-- 
Jochen Thäder  thaeder_at_kip.uni-heidelberg.de | jochen_at_thaeder.de

Computer Science/Computer Engineering
Kirchhoff Institute of Physics - Ruprecht-Karls-University Heidelberg

3.315 - Im Neuenheimer Feld 227 - D-69120 Heidelberg - Germany
Office: +49 6221 54 9816    Cell:  +49 177 384 2223

ICQ UIN: 84840251
Received on Tue Jan 24 2006 - 10:19:37 MET

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:56 MET