RE: Error while creating Embedded Canvas

From: Bertrand Bellenot <Bertrand.Bellenot_at_cern.ch>
Date: Mon, 26 Sep 2011 10:41:20 +0000


Hi Nikos,

I'm not a Qt expert, but here is a very simple example I have since quite a long time (just had to update it for Qt4). Just take a look and see if it can help you.

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 Mon Sep 26 2011 - 12:41:27 CEST

This archive was generated by hypermail 2.2.0 : Mon Sep 26 2011 - 17:50:01 CEST