RE: qtcint.dll

From: Fine, Valeri <fine_at_bnl.gov>
Date: Sun, 28 Sep 2008 01:02:47 -0400


Dear Kerry,  

> This is probably a question for Valeri Fine.
 

Thank you very much for your question and complain. One is keeping telling me that nobody needs Qt-layer and nobody uses it because nobody complains ;-)

> I have been using some of the QT classes in one of my scripts by loading the qtcint.dll library.
 

The bottom line: we can not build qtcint.dll for Qt4 classes yet, . . . however you can help.

> I have not updated my version of ROOT that is doing this particular task since 5.15.06.
> I am now trying to get this same script to run under the latest version 5.21.
> Since it has been so long since I have had to rebuild the qtcint library
> I have forgotten what steps I did before.
> I tried following the ROOT manual, but the manual is only current with ROOT 5.16
> and following the instructions in chapter 27 does not work to produce the qtcint.dll.
 

The documentation is still correct.;-)  

The "make" rule to build qtcint.dll belongs to root/graf2d/qt/Module.mk Makefile. It does contain the "qtcint" target.
This means, formally to build CINT DLLs one needs to invoke:  

        "make qtcint"  

However, the "rule" is obsolete and should fail :-(( , because it still tryies building the CINT dictionary for the Qt3 classes using the Qt3 header files. Qt3 support had been dropped and the current ROOT "configure" merely disregards the existence of the Qt3 installation if present.  

What you should do. I assume your macros use the Qt3 classes. This means there are in fact a few problems for you.  

First you should either change your classes to use Qt4 or install the previous version of the Qt-layer which is Qt3-compatible. The layer should work against of any ROOT version including the ROOT trunk.  

Can you send me an example of your macros to understand things better?  

Anyway, the current ROOT doesn't "know" yet how to build qtcint.dll against Qt4. The previous version was done by Philippe. I do now know whether the current CINT is powerful enough to parse the Qt4 header files. One has to try this yet.  

On the other hand you may not wait and just use the ACliC.

For example, the Qt4-based macro below can be compiled and executed with ACliC against of Qt4 ( Compare it with the example from the User's Guide, p. 428 )  

#ifndef __CINT__
#  include <QFileDialog>
#  include <QStringList>
#  include <QString>
#  include "TObjString.h"
#  include "TList.h"
#  include <string>
#endif

TList *QtMultiFileDialog() {
#ifdef __CINT__
  gSystem->Load("$ROOTSYS/cint/include/qtcint"); #endif
  TList *listOfNames = new TList();
  QStringList files = QFileDialog::getOpenFileNames ();   QStringList::Iterator it = files.begin();   while ( it != files.end() ) {
      std::string flnm = (*it).toStdString();
      listOfNames->Add(new TObjString(flnm.c_str()));
      ++it;

  }
  printf ("\nThe TList of the file names contains:");
  printf ("\n-------------------------------------\n");
  listOfNames->ls();
  return listOfNames;
}  

The BNL QtRoot CVS contains several simple macros like the one above. Use:
 "cvs -d :pserver:cvsuser_at_cvs.bnl.gov:/data01/CVS co -Pd qtRoot root"   See http://root.bnl.gov/QtRoot/How2Install4Unix.html for details.  

> Can you please instruct me on how to build the qtcint.dll for the latest version of ROOT?
 

  The source codes for qtcint.dll can be found under   http://root.cern.ch/viewvc/trunk/cint/cint/lib/qt/qtclasses.h?revision=22729&view=markup  

  As a temporary workaround you can use "cint/cint/lib/qt" as an example to create the   your own subset of Cint dictionary for those Qt4 classes your macros   need to use from CINT (with no ACLiC).   Is there any obstacle that forces you to use very CINT rather ACliC?  

  Mean time I'll see how quickly the qtcint.dll can be adjusted for Qt4.  

Thank you, Valeri         Received on Sun Sep 28 2008 - 07:03:02 CEST

This archive was generated by hypermail 2.2.0 : Mon Sep 29 2008 - 05:50:03 CEST