I have an application in which I display ellipses in a Canvas.
The next feature that I would like to implement is to be able to click with the Left mouse on one of these ellipses and that this action pops up a canvas with some informations related to this ellipse.
To achieve this, I defined a class which is a public class of both TEllipse and TQObject classes.
class Pad:public TEllipse, public TQObject{
void PrintIt(){cout << “clicked” << endl;}
virtual void Clicked(Int_t id) { Emit(“Clicked(Int_t)”,id); }
};
then in the class where i created the different Pad objects, I link the signal and slots.
pad[channel]->Connect(“Clicked(Int_t)”,“Pad”,pad[channel],“PrintIt()”);
Unfortunately this seems not to work at all. Executing the binary output after compilation, I get:
I have an application in which I display ellipses in a Canvas.
The next feature that I would like to implement is to be able to click with the Left mouse on one of these ellipses and that this action pops up a canvas with some informations related to this ellipse.
[/quote]
[quote]
To achieve this, I defined a class which is a public class of both TEllipse and TQObject classes.
class Pad:public TEllipse, public TQObject{
void PrintIt(){cout << “clicked” << endl;}
virtual void Clicked(Int_t id) { Emit(“Clicked(Int_t)”,id); }
};
then in the class where i created the different Pad objects, I link the signal and slots.
pad[channel]->Connect(“Clicked(Int_t)”,“Pad”,pad[channel],“PrintIt()”);
Unfortunately this seems not to work at all. Executing the binary output after compilation, I get:
hi,
as it has been suggested, I tried to start with the rqfiller.C and compile it as a standalone application (without using CINT).
I modified a bit the source code and in the source code, I commented :
RQ_OBJECT(“HFiller”)
and replaced it with:
class HFiller: public TQObject
I can excute it, but i do have this message that i do have this message
./rqfiller