RE: RE: PyQt and PyROOT

From: Fine, Valeri <fine_at_bnl.gov>
Date: Mon, 15 Jan 2007 23:25:24 -0500


Hi Johan,
Can you upload (attach) your last version of PyQt + PyROOT script to start with? I am willing to try it myself to see what is going on? Thank you.


From: Johan Bregeon [mailto:johan.bregeon_at_pi.infn.it] Sent: Mon 1/15/2007 12:41 PM
To: WLavrijsen_at_lbl.gov
Cc: Fine, Valeri; Luca Baldini; ROOT Talk Subject: Re: [ROOT] RE: PyQt and PyROOT

Thanks all for your help,
we were able to solve a couple of more problems following your advice, but unfortunately we couldn't have something stable working. but we actually do not have the time / man power /knowledge to go further with building up a ROOT application with a Qt gui, using pyroot and pyqt, so we decided to stop here on that point.

Our new idea is to use only pyRoot for this purpose, so let me start another trade...
cheers,
Johan

WLavrijsen_at_lbl.gov wrote:
> Dear all,
>
>
>> 2) What is creating the 'other' QApplication ? (we instance only one in
>> the main !)
>>
>
> well, some gApplication will need to exist at some point: both ROOT GUI (e.g.
> your histo display) as well as Qt (buttons, frame, etc.) will need to receive
> notifications from the OS, which are dispatched in a mainloop. If not, parts
> of your GUI will freeze. You can either dispatch to both systems yourself, by
> writing your own mainloop, or let QtRoot take care of it, following Valeri's
> instructions.
>
>
>> ROOT had been started (QApplication was created too via ROOT Qt
>> plug-in). May be, Wim can explain us at which point the PyROOT
>> instantiates ROOT.
>>
>
> For ROOT 5.14, you can actually override gApplication, as long as you do it
> between "import ROOT" and the first use of ROOT.<anything other than gROOT>.
> Of course, some calls on gROOT trigger the creation of a default gApplication.
>
> In your script, application creation is done later, and a TPyROOTApplication
> is created by that time (PyROOT does a simple check if ( ! gApplication ) on
> the first access to anything other than gROOT in the ROOT module, to see if it
> should create an application). I.e., this line: "ROOT.gSystem.Load('qtcint')".
>
> Note that TPyROOTApplication is nothing but a trivial TApplication derived,
> where the real work is done.
>
> HTH,
> Wim
> --
> Wim.Lavrijsen_at_cern.ch -- WLavrijsen_at_lbl.gov -- www.lavrijsen.net
>
> "Stop making excuses for your software." --first step towards quality
> "GIGO is not a valid design pattern." --corollary
>
Received on Tue Jan 16 2007 - 05:27:16 CET

This archive was generated by hypermail 2.2.0 : Tue Jan 16 2007 - 05:50:00 CET