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 Tue Sep 20 2011 - 18:55:03 CEST
This archive was generated by hypermail 2.2.0 : Thu Sep 22 2011 - 11:50:02 CEST