Hi Nikos,
Could you send a running piece of code illustrating the problem?
Cheers, Bertrand.
-----Original Message-----
From: owner-roottalk_at_root.cern.ch [mailto:owner-roottalk_at_root.cern.ch] On Behalf Of Nikolaos Karastathis
Sent: 20 September 2011 18:55
To: roottalk (Mailing list discussing all aspects of the ROOT system.)
Subject: [ROOT] Error while creating Embedded Canvas
Hi ROOTers,
I am building a standalone Qt application and I'm trying to implement an embedded canvas as an Online Display in a tab of a QTabWidget. I inserted a QWidget in the tab and got it's id with:
Int_t wid = gVirtualX->AddWindow((ULong_t) ui->displayWidget->winId(), 1050,650);
And I'm creating a TCanvas using:
TCanvas *c1 = new TCanvas("Display", 1050,650, wid);
I have also included in my main the lines
TApplication *gMyRootApp = new TApplication("My ROOT Application",
&argc, argv);
gMyRootApp->SetReturnFromRun(true);
according to this how to:
http://root.cern.ch/drupal/content/how-embed-tcanvas-external-applications
However I seem to get an error
Error in <RootX11ErrorHandler>: BadWindow (invalid Window parameter)
I thought it was the QWidget, so I created a main window to embed the canvas. When I did this the code compiled, but on execution no canvas appeared and each time I exit the application I get a segfault.
Any ideas on how to proceed?
Thanks in advance,
Nikos
-- Nikos Karastathis PH-UAT - CERN 40-2-D19 +41 22 76 71162Received on Thu Sep 22 2011 - 10:44:03 CEST
This archive was generated by hypermail 2.2.0 : Fri Sep 23 2011 - 17:50:02 CEST