How to customize Qt-layer plugin

There are several use cases when one may have wanted to install the custom version of the Qt-layer plug-in. For example:

[ul]1. The local ROOT installation lacks of the Qt-plugin
2. The ROOT installation was done against of one Qt version (for example Qt 3.x) and the user’s application requires another one (for example Qt 4.x)
3. One wants to customize / change the Qt-layer functionality.
4. One needs wants to test his/her application under the different Qt-versions[/ul]
There are two ways to build the custom Qt-Layer, namely from BNL CVS repository as well as from CERN distribution.

I. Install Qt-layer from the BNL Repository.

root.bnl.gov/QtRoot/How2Install4 … nstallroot

1.1. Check that you have installed and set your local Qt packages properly.
Make sure QTDIR env variable is provided

1.2 Login BNL CVS server.
Make sure you know the anonymous username/password combination. (For “cvsuser” the user name and password are the same.)

1.3 Option. If you want Coin3D viewer support then make sure IVROOT env variable is provided also and SoQt Coin3D module was built against of the desirable Qt version too.

1.4 Now you are ready to install ROOT with the Qt-layer.
Do:

[code]#!/bin/sh
cvs -d :pserver:cvsuser@cvs.bnl.gov:/data01/CVS co -Pd qtRoot root
cd qtRoot

define where you want to install the Qt components

make sure your installation directory path is ABSOLUTE

export QTROOTSYSDIR=pwd/qtrootsys

you may want to add Qt components into your ROOT installation

directly. In this case replace “qtrootsys” directory

name with $ROOTSYS

– For example:

– export QTROOTSYSDIR=$ROOTSYS

qmake # Do not mess QMAKE with GMAKE.
# At this point you need QMAKE

use > qmake “CONFIG+=debug” # if you want to install the Qt

                          # components with the debug 
                          # information attached

make install

Note: Please disregard the warning messages:

“WARNING: Failure to find: ${QMAKE_TARGET}Dict.cxx”

ls ${QTROOTSYSDIR}

clean the redundant files

make distclean[/code]
To install another version of the Qt-layer (for example, one needs one version to be installed against of Qt 3.x and one wants another one to be installed against Qt 4.3) change the QTROOTSYSDIR, set the new value for QTDIR and repeat the steps above.

II. Install Qt-layer from the CERN CVS Repository.

[code]#!/bin/sh
mkdir qtRoot
cd qtRoot
cvs -d :pserver:cvs@root.cern.ch:/user/cvs co -r v5-16-00 -d qt root/qt
cvs -d :pserver:cvs@root.cern.ch:/user/cvs co -r v5-16-00 -d qtroot root/qtroot

define where you want to install the Qt components

make sure your installation directory path is ABSOLUTE

export QTROOTSYSDIR=pwd/qtrootsys

you may want to add Qt components into your ROOT installation

directly. In this case replace “qtrootsys” directory

name with $ROOTSYS

– For example:

– export QTROOTSYSDIR=$ROOTSYS

echo Build qt package
cd qt
qmake # Do not mess QMAKE with GMAKE.
# At this point you need QMAKE

cd …
echo Build qtroot package
cd qtroot
qmake # Do not mess QMAKE with GMAKE.
# At this point you need QMAKE
cd …

use > qmake “CONFIG+=debug” # if you want to install the Qt

                          # components with the debug 
                          # information attached

make -C qt install
make -C qtroot install

Clean up

make -C qt distclean
make -C qtroot distclean

Note: Please disregard the warning messages:

“WARNING: Failure to find: ${QMAKE_TARGET}Dict.cxx”[/code]

If you choose to install QtRoot plugin not under your current $ROOTSYS, do not forget to add your custom library and header file directories to your LD_LIBRARY_PATH and include path