[ROOT] Two Qt projects with the embedded ROOT TCanvas.

From: Valeri Fine (fine@bnl.gov)
Date: Mon Sep 13 2004 - 23:04:16 MEST


Hello folks, 

I've prepared the Qt projects to demonstrate how the Qt designer can be used to
create quickly the ROOT applications (see:
http://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)
  
  This uses:
  
     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.
        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 http://root.bnl.gov) and run GeomBrowser.CC ROOT
macro.  This is one click installation, I mean there will no extra step but one
click there is required. (click
http://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

Valeri Fine                          
Brookhaven National Laboratory
P.O.Box 5000
Upton, NY 11973-5000
-----
Phone: +1 631 344 7806
Fax:   +1 631 344 4206
E-mail: fine@bnl.gov 



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:09 MET