RE: Qt Status bar (was RE: TProfile::Scale() and bin errors)

From: Fine, Valeri <>
Date: Fri, 13 Jan 2006 15:03:39 -0500

> I am begging a pardon for changing the confusing Subj line :)
> > Hello Rooters
> >
> > Is it possible to diplay
> > event status bar
> > and editor ( like DrawPanel)
> > in a TQtWidget ?

TQtWidget object generates a special Qt signal:

void RootEventProcessed(TObject *selected, unsigned int event, TCanvas *c);
  "TObject *selected" - is the pointer to the ROOT object selected by

                        the ROOOT TCanvas

  "unsigned int event" - The ROOT " EEventType"  event
                         (see: )
  TCanvas *c           - a pointer to the TCanvas object 
                          selected  by the "selected" TObject (first

for each mouse event happened within the widget client area.

You are free to connect this signal to your custom Qt slot. The 60 lines long C++ code "Histogram browser" shows the example:

grep -n RootEventProcessed *.*.*

38: connect(tQtWidget1,SIGNAL(RootEventProcessed(TObject *, unsigned int, TCanvas *)),this,SLOT(CanvasEvent(TObject *, unsigned int, TCanvas *)));

39: connect(tQtWidget2,SIGNAL(RootEventProcessed(TObject *, unsigned int, TCanvas *)),this,SLOT(CanvasEvent(TObject *, unsigned int, TCanvas *)));

If you do not like "qt signal you can use "ROOT Signal" instead.

One can assign a "ROOT Slot" to use the "ROOT Signal" generated by TCanvas also: Event

Hope this helps, Valeri Received on Fri Jan 13 2006 - 21:03:47 MET

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