RE: Error while creating Embedded Canvas

From: Bertrand Bellenot <Bertrand.Bellenot_at_cern.ch>
Date: Fri, 23 Sep 2011 15:00:36 +0000


Hi Nikos,

Well, you still need to process root events (e.g. with a timer) and forward events (e.g. mouse events) from the widget to the canvas... Anyway, I'll investigate further, but in the meanwhile, you could take a look at the examples in $ROOTSYS/gui/qtgsi/test/example1 and $ROOTSYS/gui/qtgsi/test/example1

Cheers, Bertrand.

-----Original Message-----
From: Nikolaos Karastathis
Sent: 23 September 2011 16:43
To: Bertrand Bellenot
Cc: roottalk (Mailing list discussing all aspects of the ROOT system.) Subject: Re: [ROOT] Error while creating Embedded Canvas

Hello,

Actually, when adding the winId() of a window or a widget when the program executes nothing really happens. What I did is to pass the id of the widget in which I want the canvas to appear and then in the constructor of the UI to draw an empty histo. Then when the Start is pressed fill the histo and update the canvas.

The output was that no canvas or histo was created during execution and when the button was pressed the process was irresponsive and I had to kill it.

Greetings,
Nikos

On 09/23/2011 02:56 PM, Bertrand Bellenot wrote:
> Hi Nikos,
>
> You have to pass the Window id to gVirtualX->AddWindow(), and not the widget. I.e:
> int wid = gVirtualX->AddWindow((ULong_t)ui->displayWidget->winId(),
> 530, 300);
>
> Cheers, Bertrand.

--
Nikos Karastathis
PH-UAT - CERN
40-2-D19
+41 22 76 71162
Received on Fri Sep 23 2011 - 17:00:43 CEST

This archive was generated by hypermail 2.2.0 : Fri Sep 23 2011 - 17:50:02 CEST