OK, another clarification to my situation.
So I’m developing a plugin for a QT3 based ATLAS monitoring program called Online Histogram Presenter(OHP). I was suppose to be updated to QT4 a long time ago, but has not been done yet and probably will not happen before beam so I’m stuck using QT3.
From what I can tell they have recompiled your QTROOT classes (from ROOT v5.18 or less) with the ATLAS online software (which is using ROOT v5.22) so they can continue using QT3. The problem now is…
I was able to get my simple program working with just showing a histogram in a QT window using your TQtWidget class (per your HelloClick example). However, they have not included the TQtWidget in their list of classes. So I only have access to the following classes:
TQApplication
TQCanvasImp
TQCanvasMenu
TQRootCanvas
TQRootDialog
TQRootGuiFactory
TQRootWindow
In my plugin, I just want to have an independent window popup and display a histogram. I’ve tried this code and it doesn’t seem to work:
====
frame = new QFrame();
frame->resize(400,435);
qrootCanvas = new TQRootCanvas(frame,“qrootCanvas”);
qrootCanvas->SetName(“canvas”);
qrootCanvas->SetTitle(“Plot Canvas”);
static struct needgraph { needgraph() { TApplication::NeedGraphicsLibs(); gApplication->initializeGraphics();} } needgraph;
TFile file(“file.root”,“READ”);
TList* list = file.GetListOfKeys();
TKey* key = (TKey*)list->At(0);
TH2S* temp= (TH2S*)key->ReadObj();
histogram = new TH2S(*temp);
histogram->SetDirectory(0);
TCanvas* canvas = qrootCanvas->getCanvas();
canvas->GetListOfPrimitives()->Add(histogram,“colz”);
canvas->Modified();
frame->show();
With this I do get the frame window showing up, but no histogram inside.
I tried essentially doing what you did with the TQtWidget, but instead just using the TQRootCanvas class. Is this not a good method? Perhaps I need to do something else.
Can you guide me to the correct method?
Thanks as always,
Taylor