RE: [ROOT] ROOT 4.01/04

From: Faine, Valeri (fine@bnl.gov)
Date: Sun Nov 21 2004 - 02:23:17 MET


Hello Jacek, 

Sorry for some dealy with m,y replies.
My week-end modem is not as fast as RootTalk discussion evolves on issue :-)

 
> Hi,
> 
> > If you can reproduce the problem, send me the shortest possible setup.
> 
> Well, Rene, here it is ...
> Create the following c++ file ("x.cxx") ...
> -------------------------- x.cxx begins here
> #include "TQtWidget.h"
> #include "TGButton.h"
> -------------------------- x.cxx ends here
> ... and try to compile it :
> 	g++ -c -I${QTDIR}/include -I${ROOTSYS}/include x.cxx

That must cause the compilation problem as I had indicated with other
messages on issue.  

On other hand you have certainly your own code design issue, that has
nothing to do with the "emit" macro side effect.

1. The presence of TGButton implies you are going to use ROOT GUI. In this
case you should NOT need TQtWidget at all. You should be able to use
TCanvas.
If you want the embedded TCanvas you should create the embedded TCanvas.
This class has a special ctor to do that. That will create you a proper
embedded TCanvas (based on the current TVirtualX implementation, i.e. with
Qt or with Win32 or with X11).

2. On the other hand if "TQtWidget" header indicates your intention to use
Qt GUI then you should not use TGButton. You should use QButton instead.

I believe it is error prone mixing ROOT and Qt GUI within one and the same
class implementation code.

Can you send me the file with the trouble code to understand why it is
essential to mix and mess things.

The Qt/Root layer design must allow keep things separately and avoid any
side effect. If this is NOT possible for REAL application then let me know.
I'll look for the way to improve the layer design. 

 Thank you.
              Valeri





  If you use ROTO GUI you should not use 
> Jacek.



-----
Best Regards
                                Valeri Fine
Brookhave National Laboratory
Upton, NY 11973. USA
Phone: +1 631 344 7808
Fax:    +1 63



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