RE: [ROOT] Confused about ROOT GUI under Windows

From: H.-Gerd Rosarius (rosarius@getit.de)
Date: Fri Aug 01 2003 - 11:01:34 MEST


Hello Valeri,

thanks for your reply.

>Hello dear H.-Gerd Rosarius

>I am begging a pardon for the wrong post.
>This is the corrected version of my reply.

>I understand you tried gdk version and got some problems.
>I hope you have found and followed the V.Onuchin's and Rene's advice.
  
I'm still following. :o)

>Anyway my concern is very Qt-edition I am preparing to release.

>Therefore I world like to understand better:
> - Did you find the Qt-example I was speaking about with my last post?

Yes, I found them and reviewed them before my first posting.
Anyway, thanks for that hint.

> - Did you try to follow this example? 

Yes, I followed and understood them. (I think...)

> - Did you succeed?

I did not try to make them running yet. But I'll do very soon.

> The $ROOTSYS/test/qt contains the original example from Qt and the
> "ROOT"-ed version of that example. 
> This is to allow the code comparison.  
> This shows (starting from the pure Qt application) what should 
> be done to make that example work together with ROOT widgets).
>The same question can be asked about other ROOT "edition" (with win32
>and "gdk" layer) Each ROOT distribution coming with the $ROOTSYS/test
>directory.
 
>> after a lot of roottalk reading and unsuccessful coding I am
>> quite confused as well as frustrated about ROOT's ability to create
>> GUI applications for windows.
>> 
>> My mission is simple: Creating a standalone GUI application that
>> has no other functionality than to display ROOT histograms and is
>> portable between Windows and Linux. (while Linux isn't the problem)
>> The histograms are serialized in a root-file.
>> First I tried to build such an application for MS Windows 2000 with
>> the ROOT TG*-Classes. To cut a long story short: I didn't manage
>> to do it, because the application always crashed when I used
>> a simple self-written class that was derived from TGMainFrame,
>> included the RQ_OBJECT- and ClassDef-Makro. It goes without saying
>> that I made a dictionary, too.

>You say your goal is "display ROOT histograms ". Is it correct?

Let's dig a bit deeper in that part. I make analyses with ROOT, 
create histograms and some trees that keep the result in detail. 
Both I save to a root-file. 
The goal is an application that is able to read my root-files and to 
display the saved histograms in a GUI-environment under Windows 
and Linux.
Like, hmmm, let's say a small Acrobat Reader for my ROOT files with
typical funtions like printing and so on.

>ROOT tutorials contains plenty of the working examples to pick.
>Just tell us (I am interesting to see the Qt-based one), 
>  1. "I wrote that code" (and attach its source), 
>  2. "this way" (and attach your makefile) 
>  3. and  "got that result" (and attach the output),

> Did you read http://root.bnl.gov/QtRoot/QtRoot.html#tguiclass ?

Sure I did! There I got the idea to build the QT-Application
I mentioned in http://root.cern.ch/root/roottalk/roottalk03/3197.html.
QT is interesting because it is quite easy to build portable GUIs for
Linux and Windows. In this case I would just need an interface from
ROOT to QT to put histogram objects like "TH1F" on a TCanvas and 
embed/display them in my QT-GUI. 
>From http://root.bnl.gov/QtRoot/QtRoot.html#embed I had the impression
TQtWidget would be the right class for that.

>> However, another attempt was to build a QT-Application that used
>> the TQtWidget-class out of the "ROOT Qt-Edition" from BNL.
>> (See http://root.cern.ch/root/roottalk/roottalk03/3194.html and
>> http://root.cern.ch/root/roottalk/roottalk03/3197.html)
>> 
>> Valeri wrote back that this won't work.
>> (See http://root.cern.ch/root/roottalk/roottalk03/3203.html)

> No I did not say that.
> I did say you should create ROOT application then you can add 
> there any Qt-widget. Or even better you should create your own DLL,
> then start ROOT and load that DLL in. 
> This way you may not think about creating QApplication/TApplication. 
> root.exe will do this for you and properly.
> How to do this the $ROOTSYS/test/qt example shows.
>  My best regards, Valeri

Maybe I misunderstood you there.

>> Greetings

>>   H.-Gerd Rosarius

Thanks a lot for your posting and my best regards

  H.-Gerd



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:14 MET