Qt4 and ROOT

Dear ROOT developers,

I’m currently developing a QT interface using some ROOT objects like TCanvas.
I have compiled the last svn version of ROOT using --enable-qt option and I’m running actually the latest QT version 4.3.3 (compiled without specific option)
(My System is a Linux Fedora core 8 x86_64)
Everything compile without any problem.
To test my environment, I try to run one of the examples in the ROOT Documentation. (HelloCanvas)

qmake
make
./HelloCanvas

This example seams to work and the TCanvas is correctly display but it gives a lot of errors in the terminal.

[quote]X Error: BadDrawable (invalid Pixmap or Window parameter) 9

Major opcode: 55 (X_CreateGC)

Resource id: 0x0

X Error: BadDrawable (invalid Pixmap or Window parameter) 9

Major opcode: 55 (X_CreateGC)

Resource id: 0x0

X Error: BadGC (invalid GC parameter) 13

Major opcode: 60 (X_FreeGC)

Resource id: 0x140005f

X Error: BadGC (invalid GC parameter) 13

Major opcode: 60 (X_FreeGC)

Resource id: 0x140005e

[/quote]

Please let me know if it’s possible to correct this problem
Best Regards
Stephane




Valeri Fine will investigate your problem with Qt

Rene

Hello
Thank you for your report.
Yes, I’ve reproduced that with some X-manager and shall investigate the cause.

Can you specify whether you see this problem at once (at the very beginning of the ROOT session) or it recurs (for example with each TCanvas invocations)?

Thank you.
Valeri

Dear Valeri,

We actually did three tests. The first one was the HelloCanva test.
The second and third were done as follows. The TQtWidget was created as a member of a Qt widget, then in this widget the showcanvas method, (which is a copy of your HelloCanva code) is invocated.

Here in the parent widget constructor (instantiation of TQtWidget)
MyWidget= new TQtWidget(0,“MyWidget”);
//vbox1->addWidget(MyWidget); //in test #2 this was uncommented and in #3 it is commented
ShowCanvas(true);
setLayout(vbox1);

The ShowCanvas method is below
void TRunControl::ShowCanvas(bool)
{
MyWidget->resize(640,480);
MyWidget->show();
MyWidget->GetCanvas()->cd();
TGraph *mygraph;
float x[3] = {1,2,3};
float y[3] = {1.5, 3.0, 4.5};
mygraph = new TGraph(3,x,y);
mygraph->SetMarkerStyle(20);
mygraph->Draw(“AP”);
MyWidget->GetCanvas()->Update();

}

In both case we had the following error message:

** $Id: TGQt.cxx 20882 2007-11-19 11:31:26Z rdm $ this=0xc94fd0
[Detaching after fork from child process 10208. (Try `set detach-on-fork off’.)]
Error in TUnixSystem::DynamicPathName: QtRootGui[.so | .sl | .dl | .a | .dll] does not exist in /usr/local/software/exec/root_21128/lib/root/cintinclude:.:/usr/local/software/exec/root_21128/lib/root::/usr/local/software/exec/root_21128//lib/root/:/usr/local/software/exec/Trolltech/Qt-4.3.3//lib:


  •                                     *
    
  •    W E L C O M E  to  R O O T       *
    
  •                                     *
    
  • Version 5.17/09 14 December 2007 *
  •                                     *
    
  • You are welcome to visit our Web site *
  •      [root.cern.ch](http://root.cern.ch)            *
    
  •                                     *
    

ROOT 5.17/09 (nov 30 2007, 17:08:11@21358, déc 03 2007, 10:19:07 on linuxx8664gcc)
CINT/ROOT C/C++ Interpreter version 5.16.29, Jan 08, 2008
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 55 (X_CreateGC)
Resource id: 0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 55 (X_CreateGC)
Resource id: 0x0
X Error: BadGC (invalid GC parameter) 13
Major opcode: 60 (X_FreeGC)
Resource id: 0x3c00007
X Error: BadGC (invalid GC parameter) 13
Major opcode: 60 (X_FreeGC)
Resource id: 0x3c00006
Qt: Cannot set locale modifiers:

Now the behavior is different, when addWidget is commented, the Tcanvas appears but on a different window. In case #3 the application crashes with a SIGSEV

[quote=“stephane”]Dear Valeri,

We actually did three tests. The first one was the HelloCanva test.
The second and third were done as follows. The TQtWidget was created as a member of a Qt widget, then in this widget the showcanvas method, (which is a copy of your HelloCanva code) is invocated.

Here in the parent widget constructor (instantiation of TQtWidget)
MyWidget= new TQtWidget(0,“MyWidget”);
//vbox1->addWidget(MyWidget); //in test #2 this was uncommented and in #3 it is commented
ShowCanvas(true);
setLayout(vbox1);

The ShowCanvas method is below
void TRunControl::ShowCanvas(bool)
{
[ . . . ]
}

In both case we had the following error message:

Now the behavior is different, when addWidget is commented, the Tcanvas appears but on a different window. In case #3 the application crashes with a SIGSEV[/quote]
There TWO unrelated issues with your tests.

  1. There is some problem with the X- window manager indicated by the error messages coming from the X-server. This is a kind of thing, I have to reproduce and investigate to fix
  2. Another problem is yours. You do not construct the Qt widget properly.[quote=“stephane”]The TQtWidget was created as a member of a Qt widget, [/quote]It does not matter whether one widget is the data-member of another one. This fact does not affect the widget hierarchy on the screen. To create the proper hierarchy one has to establish the parent child relationship between the widgets. To do so with your concrete case you have to replace the statement:

MyWidget= new TQtWidget(0,"MyWidget");withMyWidget= new TQtWidget(this,"MyWidget");to specify MyWidget is the child of this widget. You are adviced to remove MyWidget->GetCanvas()->Update(); and MyWidget->show(); I assume the “show” invocation has to be used elsewhere. Anyway, I think you void TRunControl::ShowCanvas and show should be separated.
I am going to build your example and will come back with the more concrete advice shortly.

Can you send / upload your tests in full. That I can evaluate and provide the concrete advice?

I have couple of the other comments about your code
The lines://vbox1->addWidget(MyWidget); //in test #2 this was uncommented and in #3 it is commented ShowCanvas(true); setLayout(vbox1); indicates your MyWidget is supposed to be a part of the vbox1 layout. If this is correct then your attempt to change the widget size is wrong. If the widget is the part of the Qt layout, then the correct way to change its size is to change the layout property. This is the job of the layout to maintain the proper size of the widget attached to the layout. You must not do that alone.
This means you have to remove the statement

MyWidget->resize(640,480); from your code and apply it to the MyWidget parent layout instead. Well, you did not set any “parent” for MyWidget. This way you got one problem over another one. Please fix (or send me your FULL code to review).

Dear Valeri,

We made the modifications you proposed. Then if we actually encapsulate the
TQtWidget into another widget it “seems” to work, but still with X11
problems. (by the way, is it normal that a mouse right click doesn’t open the
contextual menu?)

Now what we noticed is that the TQtWidget does not seem to have a default
size. For instance if we try to embedded this object in a another widget that
includes a widget(QPushbutton) and a stretch, the TQtWidget does not
appear. However, once we remove the addStretch line, the widget appears.
Please try the attached code, the line to comment, uncomment is line #45.

What we would like to know, what is the difference between the qtroot included
with the root sources (from CERN) and the qtRoot (‘R’ in caps) provided by the
BNL CVS.

Also, we tried to compile the QtLayer (from BNL) on 2 differents machines 32 bit
and 64 bit with the same version of root and the code does not compile in a 64
bit machine

Best Regards
t4.tar.gz (61.9 KB)

Hello
Thank you for the bug report.
It is fixed in BNL CVS
Thank you for the code. You are correct I’ll try to fix it.
The main (temporary) problem is that I still have to support Qt3 and Qt4 which is not what was originaly planned.
The idea was to

[ul] 1. freeze the Qt3-related code,
2. introduce Qt4
3. remove Qt3
4. complete Qt4[/ul]

I am still waiting the CERN “permission” to complete the step “3” .

Anyway, thank you for your valuable feedback and example. I’ll try to fix this issue also ASAP.

About “Conext Menu” the answer is, it is NOT normal and it does work with Qt3. It is known and planned to do that with the step 4 (see above).
Well, because of the the user (your ) demand I am to try to provide the solution earlier (right now :wink:.
For you info, please communicate all QtRoot (Extenstion) questions via the dedicated mail-list lists.bnl.gov/pipermail/qt-root-l rather via RootForum.

[quote=“stephane”] . . .What we would like to know, what is the difference between the qtroot included
with the root sources (from CERN) and the qtRoot (‘R’ in caps) provided by the
BNL CVS.[/quote] There is no big difference.
I have no write access to the CERN SVN repository. Therefore I make all corrections with the QtROOT CVS at BNL (like I did right now to address your 64-bit compilation error) and then propagate it to the CERN. This suggests that the BNL version is always slightly fresher that from CERN.

Dear Valeri,

Thank you for this fast bug correction. :smiley:
I make the cvs update on my qtRoot directory and recompile the code…
But it seams to me that we have another cast problem

Best Regards

Stephane

Thank you, fixed.
Let’s close this thread and switch to
lists.bnl.gov/pipermail/qt-root-l as soon as
the bug in QtRoot is concern.

Just for record. Personally I have don’t object to reply any QtRoot related question via this list. However, I was asked not to pollute with QtRoot messages the RootForum and steer these message away. Thank you very much for cooperation. Let keep RootForum clean :wink:

[quote]Now what we noticed is that the TQtWidget does not seem to have a default
size. [/quote]I have introduced the default non-zero min size for the TQtWidget and slightly changed the size policy. Please, try it now and tell me whether it looks better. Frankly, I do not know yet what the best values for these attributes are. Please, play with these attributes. As soon as you find it is OK I propagate the correction to CERN SVN.

I’ve re-checked the ROOT “ContextMenu”. It works properly as soon as the “Qt Root Extension” is installed. However, it should work with no “Extension” as well. I still need to find out the cause.

Hi Valeri,

Thanks Valeri, since you introduced this default min size, the layout manager works better and there is no more error messages due to QPainter. However now we face another problem, when we close the application we observe a segmentation fault (please look at the error message). This happens with the example we provided (t4), but also with our acquisition application. What may be important to notice for debugging this, is that in our acquisition application, which features several tabs, one tab has the TQtwidget embedded in it. If we launch the application and do not select the tab featuring the TQtwidget there is no segmentation fault when we close the application. However if we select it, there is a segmentation fault at closing time. It is like we start an interactive root session, but we do not close it properly. Is there a proper way to clean the TQtWidget at closing time in order to avoid this problem or is it a TQtWidget problem?

Regards,
Stephane

Warning in TClassTable::Add: class TMatrixTBase already in TClassTable
Warning in TClassTable::Add: class TMatrixTBase already in TClassTable
Warning in TClassTable::Add: class TVectorT already in TClassTable
Warning in TClassTable::Add: class TVectorT already in TClassTable
Warning in TClassTable::Add: class TMatrixT already in TClassTable
Warning in TClassTable::Add: class TMatrixTSym already in TClassTable
Warning in TClassTable::Add: class TMatrixTSparse already in
TClassTable
Warning in TClassTable::Add: class TMatrixTLazy already in TClassTable
Warning in TClassTable::Add: class TMatrixTRow_const already in
TClassTable
Warning in TClassTable::Add: class TMatrixTRow already in TClassTable
Warning in TClassTable::Add: class TMatrixTDiag_const already in
TClassTable
Warning in TClassTable::Add: class TMatrixTColumn_const already in
TClassTable
Warning in TClassTable::Add: class TMatrixTFlat_const already in
TClassTable
Warning in TClassTable::Add: class TMatrixTSub_const already in
TClassTable
Warning in TClassTable::Add: class TMatrixTSparseRow_const already in
TClassTable
Warning in TClassTable::Add: class TMatrixTSparseDiag_const already in
TClassTable
Warning in TClassTable::Add: class TMatrixTColumn already in
TClassTable
Warning in TClassTable::Add: class TMatrixTDiag already in TClassTable
Warning in TClassTable::Add: class TMatrixTFlat already in TClassTable
Warning in TClassTable::Add: class TMatrixTSub already in TClassTable
Warning in TClassTable::Add: class TMatrixTSparseRow already in
TClassTable
Warning in TClassTable::Add: class TMatrixTSparseDiag already in
TClassTable
Warning in TClassTable::Add: class TMatrixTSymLazy already in
TClassTable
Warning in TClassTable::Add: class TMatrixTRow_const already in
TClassTable
Warning in TClassTable::Add: class TMatrixT already in TClassTable
Warning in TClassTable::Add: class TMatrixTSym already in TClassTable
Warning in TClassTable::Add: class TMatrixTSymLazy already in
TClassTable
Warning in TClassTable::Add: class TMatrixTRow already in TClassTable
Warning in TClassTable::Add: class TMatrixTSparse already in
TClassTable
Warning in TClassTable::Add: class TMatrixTSparseRow_const already in
TClassTable
Warning in TClassTable::Add: class TMatrixTSparseRow already in
TClassTable
Warning in TClassTable::Add: class TMatrixTLazy already in TClassTable
Warning in TClassTable::Add: class TMatrixTDiag_const already in
TClassTable
Warning in TClassTable::Add: class TMatrixTColumn_const already in
TClassTable
Warning in TClassTable::Add: class TMatrixTSparseDiag_const already in
TClassTable
Warning in TClassTable::Add: class TDecompBase already in TClassTable
Warning in TClassTable::Add: class TDecompBK already in TClassTable
Warning in TClassTable::Add: class TDecompChol already in TClassTable
Warning in TClassTable::Add: class TDecompLU already in TClassTable
Warning in TClassTable::Add: class TDecompQRH already in TClassTable
Warning in TClassTable::Add: class TDecompSparse already in TClassTable
Warning in TClassTable::Add: class TDecompSVD already in TClassTable
Warning in TClassTable::Add: class TMatrixDEigen already in TClassTable
Warning in TClassTable::Add: class THaarMatrixT already in TClassTable
Warning in TClassTable::Add: class THilbertMatrixT already in
TClassTable
Warning in TClassTable::Add: class THilbertMatrixTSym already in
TClassTable
Warning in TClassTable::Add: class TMatrixDSymEigen already in TClassTable
Warning in TClassTable::Add: class TMatrixTFlat_const already in
TClassTable
Warning in TClassTable::Add: class TMatrixTSub_const already in
TClassTable
Warning in TClassTable::Add: class TMatrixTColumn already in
TClassTable
Warning in TClassTable::Add: class TMatrixTDiag already in TClassTable
Warning in TClassTable::Add: class TMatrixTFlat already in TClassTable
Warning in TClassTable::Add: class TMatrixTSub already in TClassTable
Warning in TClassTable::Add: class TMatrixTSparseDiag already in
TClassTable
Warning in TClassTable::Add: class THaarMatrixT already in TClassTable
Warning in TClassTable::Add: class THilbertMatrixT already in
TClassTable
Warning in TClassTable::Add: class THilbertMatrixTSym already in
TClassTable
Warning in TClassTable::Add: class TAxis already in TClassTable
Warning in TClassTable::Add: class TH1 already in TClassTable
Warning in TClassTable::Add: class TF1 already in TClassTable
Warning in TClassTable::Add: class TBinomialEfficiencyFitter already in
TClassTable
Warning in TClassTable::Add: class TConfidenceLevel already in TClassTable
Warning in TClassTable::Add: class TFormula already in TClassTable
Warning in TClassTable::Add: class TFormulaPrimitive already in TClassTable
Warning in TClassTable::Add: class TF2 already in TClassTable
Warning in TClassTable::Add: class TF12 already in TClassTable
Warning in TClassTable::Add: class TF3 already in TClassTable
Warning in TClassTable::Add: class TFractionFitter already in TClassTable
Warning in TClassTable::Add: class TVirtualHistPainter already in TClassTable
Warning in TClassTable::Add: class TH2 already in TClassTable
Warning in TClassTable::Add: class TH2D already in TClassTable
Warning in TClassTable::Add: class TGraph2D already in TClassTable
Warning in TClassTable::Add: class TGraph2DErrors already in TClassTable
Warning in TClassTable::Add: class TGraphDelaunay already in TClassTable
Warning in TClassTable::Add: class TH1D already in TClassTable
Warning in TClassTable::Add: class TH1C already in TClassTable
Warning in TClassTable::Add: class TH1S already in TClassTable
Warning in TClassTable::Add: class TH1I already in TClassTable
Warning in TClassTable::Add: class TH1F already in TClassTable
Warning in TClassTable::Add: class TH1K already in TClassTable
Warning in TClassTable::Add: class TProfile already in TClassTable
Warning in TClassTable::Add: class TH2C already in TClassTable
Warning in TClassTable::Add: class TH2S already in TClassTable
Warning in TClassTable::Add: class TH2I already in TClassTable
Warning in TClassTable::Add: class TH2F already in TClassTable
Warning in TClassTable::Add: class TProfile2D already in TClassTable
Warning in TClassTable::Add: class TH3 already in TClassTable
Warning in TClassTable::Add: class TH3C already in TClassTable
Warning in TClassTable::Add: class TH3S already in TClassTable
Warning in TClassTable::Add: class TH3I already in TClassTable
Warning in TClassTable::Add: class TH3F already in TClassTable
Warning in TClassTable::Add: class TH3D already in TClassTable
Warning in TClassTable::Add: class THLimitsFinder already in TClassTable
Warning in TClassTable::Add: class THnSparseArrayChunk already in TClassTable
Warning in TClassTable::Add: class THnSparse already in TClassTable
Warning in TClassTable::Add: class THnSparseT already in TClassTable
Warning in TClassTable::Add: class THnSparseT already in TClassTable
Warning in TClassTable::Add: class THnSparseT already in TClassTable
Warning in TClassTable::Add: class THnSparseT already in TClassTable
Warning in TClassTable::Add: class THnSparseT already in TClassTable
Warning in TClassTable::Add: class THnSparseT already in TClassTable
Warning in TClassTable::Add: class THStack already in TClassTable
Warning in TClassTable::Add: class TLimitDataSource already in TClassTable
Warning in TClassTable::Add: class TLimit already in TClassTable
Warning in TClassTable::Add: class TMultiDimFit already in TClassTable
Warning in TClassTable::Add: class TPolyMarker already in TClassTable
Warning in TClassTable::Add: class TPrincipal already in TClassTable
Warning in TClassTable::Add: class TProfile3D already in TClassTable
Warning in TClassTable::Add: class TFile already in TClassTable
Warning in TClassTable::Add: class TArchiveMember already in TClassTable
Warning in TClassTable::Add: class TArchiveFile already in TClassTable
Warning in TClassTable::Add: class TStreamerInfo already in TClassTable
Warning in TClassTable::Add: class TBufferFile already in TClassTable
Warning in TClassTable::Add: class TGenCollectionProxy already in TClassTable
Warning in TClassTable::Add: class TEmulatedCollectionProxy already in
TClassTable
Warning in TClassTable::Add: class TCollectionProxyFactory already in
TClassTable
Warning in TClassTable::Add: class TCollectionStreamer already in TClassTable
Warning in TClassTable::Add: class TCollectionClassStreamer already in
TClassTable
Warning in TClassTable::Add: class TCollectionMemberStreamer already in
TClassTable
Warning in TClassTable::Add: class TKey already in TClassTable
Warning in TClassTable::Add: class TDirectoryFile already in TClassTable
Warning in TClassTable::Add: class TGenCollectionProxy::Value already in
TClassTable
Warning in TClassTable::Add: class TGenCollectionProxy::Method already in
TClassTable
Warning in TClassTable::Add: class TEmulatedMapProxy already in TClassTable
Warning in TClassTable::Add: class TFileCacheRead already in TClassTable
Warning in TClassTable::Add: class TFileCacheWrite already in TClassTable
Warning in TClassTable::Add: class TFree already in TClassTable
Warning in TClassTable::Add: class TMapFile already in TClassTable
Warning in TClassTable::Add: class TKeyMapFile already in TClassTable
Warning in TClassTable::Add: class TMapRec already in TClassTable
Warning in TClassTable::Add: class TZIPMember already in TClassTable
Warning in TClassTable::Add: class TZIPFile already in TClassTable
Warning in TClassTable::Add: class TAttImage already in TClassTable
Warning in TClassTable::Add: class TPaletteEditor already in TClassTable
Warning in TClassTable::Add: class TImagePalette already in TClassTable
Warning in TClassTable::Add: class TSpline already in TClassTable
Warning in TClassTable::Add: class TText already in TClassTable
Warning in TClassTable::Add: class TGraphPolargram already in TClassTable
Warning in TClassTable::Add: class TGraphPolar already in TClassTable
Warning in TClassTable::Add: class TGraphSmooth already in TClassTable
Warning in TClassTable::Add: class TImage already in TClassTable
Warning in TClassTable::Add: class TImagePlugin already in TClassTable
Warning in TClassTable::Add: class TLatex already in TClassTable
Warning in TClassTable::Add: class TLegendEntry already in TClassTable
Warning in TClassTable::Add: class TLegend already in TClassTable
Warning in TClassTable::Add: class TLink already in TClassTable
Warning in TClassTable::Add: class TPieSlice already in TClassTable
Warning in TClassTable::Add: class TPie already in TClassTable
Warning in TClassTable::Add: class TPoints already in TClassTable
Warning in TClassTable::Add: class TSplinePoly already in TClassTable
Warning in TClassTable::Add: class TSplinePoly3 already in TClassTable
Warning in TClassTable::Add: class TSplinePoly5 already in TClassTable
Warning in TClassTable::Add: class TSpline3 already in TClassTable
Warning in TClassTable::Add: class TSpline5 already in TClassTable
Warning in TClassTable::Add: class TTF already in TClassTable
Warning in TClassTable::Add: class TEllipse already in TClassTable
Warning in TClassTable::Add: class TArc already in TClassTable
Warning in TClassTable::Add: class TLine already in TClassTable
Warning in TClassTable::Add: class TArrow already in TClassTable
Warning in TClassTable::Add: class TBox already in TClassTable
Warning in TClassTable::Add: class TCrown already in TClassTable
Warning in TClassTable::Add: class TPolyLine already in TClassTable
Warning in TClassTable::Add: class TCurlyLine already in TClassTable
Warning in TClassTable::Add: class TCurlyArc already in TClassTable
Warning in TClassTable::Add: class TGraph already in TClassTable
Warning in TClassTable::Add: class TCutG already in TClassTable
Warning in TClassTable::Add: class TPave already in TClassTable
Warning in TClassTable::Add: class TPaveText already in TClassTable
Warning in TClassTable::Add: class TDiamond already in TClassTable
Warning in TClassTable::Add: class TWbox already in TClassTable
Warning in TClassTable::Add: class TFrame already in TClassTable
Warning in TClassTable::Add: class TGaxis already in TClassTable
Warning in TClassTable::Add: class TGraphAsymmErrors already in TClassTable
Warning in TClassTable::Add: class TGraphBentErrors already in TClassTable
Warning in TClassTable::Add: class TGraphErrors already in TClassTable
Warning in TClassTable::Add: class TGraphQQ already in TClassTable
Warning in TClassTable::Add: class TMarker already in TClassTable
Warning in TClassTable::Add: class TMultiGraph already in TClassTable
Warning in TClassTable::Add: class TPaveLabel already in TClassTable
Warning in TClassTable::Add: class TPaveStats already in TClassTable
Warning in TClassTable::Add: class TPavesText already in TClassTable
Warning in TClassTable::Add: class TAttCanvas already in TClassTable
Warning in TClassTable::Add: class TView already in TClassTable
Warning in TClassTable::Add: class TCanvas already in TClassTable
Warning in TClassTable::Add: class TPad already in TClassTable
Warning in TClassTable::Add: class TButton already in TClassTable
Warning in TClassTable::Add: class TControlBar already in TClassTable
Warning in TClassTable::Add: class TClassTree already in TClassTable
Warning in TClassTable::Add: class TColorWheel already in TClassTable
Warning in TClassTable::Add: class TControlBarButton already in TClassTable
Warning in TClassTable::Add: class TDialogCanvas already in TClassTable
Warning in TClassTable::Add: class TGroupButton already in TClassTable
Warning in TClassTable::Add: class TInspectCanvas already in TClassTable
Warning in TClassTable::Add: class TPaveClass already in TClassTable
Warning in TClassTable::Add: class TSlider already in TClassTable
Warning in TClassTable::Add: class TSliderBox already in TClassTable
Warning in TClassTable::Add: class TViewer3DPad already in TClassTable
Erreur de segmentation

Did you try to replace your connect(quit, SIGNAL(clicked()), qApp, SLOT(quit()));with connect(quit, SIGNAL(clicked()), TQtRootSlot::CintSlot(), SLOT(TerminateAndQuit())); defined by TQtRootSlot.h? This is to terminate ROOT first and then quit Qt.

/////////////////////////////////////////////////////////////////////////// // // The TQRootSlot singleton class introduces the global SLOT to invoke // the ROOT command line from the GUI signals // Optionally one can execute TApplication::Terminate method directly // // It provides a Qt slot to attach the CINT C++ interpreter // to any Qt signal // To execute any C++ statement from the GUI one should connect // his/her Qt signal with the Qt slot of the global instance of this class // // connect(GUI object, SIGNAL(const char *editedLine),TQtRootSlot::CintSlot(),SLOT(ProcessLine(const char*))) // // To terminate the ROOT from GUI element connect the signal with the Terminate slot. // For example to terminate ROOT and Qt smoothly do // // connect(qApp,SIGNAL(lastWindowClosed()),TQtRootSlot::CintSlot(),SLOT(TerminateAndQuit()) // ///////////////////////////////////////////////////////////////////////////

By the way, your log [quote=“stephane”]
Warning in TClassTable::Add: class TMatrixTBase already in TClassTable
Warning in TClassTable::Add: class TMatrixTBase already in TClassTable
Warning in TClassTable::Add: class TVectorT already in TClassTable
Warning in TClassTable::Add: class TVectorT already in TClassTable
. . .
[/quote]indicates your application attempts to load the ROOT shared libraries twice. Probably, you should start another dedicated Forum thread on the issue to get it addressed :unamused: .