I’ve prepared the Qt projects to demonstrate how the Qt designer can be used to create quickly the ROOT applications (see: root.bnl.gov/QtRoot/QtRoot.html#designer )
There are two examples, the simple (60 lines of the “handwritten” C++ code) and advanced (400 lines of the “handwritten” C++ code) ones.
- ROOT histogram browser
- ROOT Geometry browser
The later is a Qt “QMainWindow” application with the ROOT embedded "TCanvas"
It demonstrates the advanced technique to create the unique ROOT-based application with Qt gui. (v.3.3)
1. QListView with QCheckListItem - that has no equivalent in ROOT gui 2. The TQtWidget - that to create the embedded TCanvas widget. That has no equivalent in QT gui. [root.bnl.gov/QtRoot/GeomBrowserMain.png](http://root.bnl.gov/QtRoot/GeomBrowserMain.png)
To easiest way to see how it works is to download and install the Win32 binaries of ROOT with “Qt layer” (from root.bnl.gov/QtRoot/downloads/root.4.00.08.exe )
I estimate one needs about 4 min of the personal time and 20-30 Mg of the disk space to complete the evaluation.
You can download the working simple Qt “ROOT histogram browser” project, read README file and try it yourself. This example needs the “QT layer” to be installed only
The advanced example (read README ) provides the close to real life application to navigate the ROOT geometry tree. The Windows binary distribution includes the 200 Kb ROOT file with the complete STAR detector geometry. In addition one can download the full ATLAS detector geometry 1 MGb file to play with.
To build and run this example you have to install the “ROOT Qt Extensions” as well. However it may work with the “Qt layer” also. Some functions will not be available though.
Keep in mind they are not the real applications yet. They are examples.
I tried to keep it simple to understand. I deliberately avoided using anything but “Qt designer” to make these projects up. So 90% of the C++ code is generated automatically for you.
Your feedback is highly appreciated.
My best regards, Valeri