I am trying to make a standalone Qt application and complie the Root libraries. However, to draw objects such as histrograms from Qt, I understand that I need TQtWidget. Where is the source code for TQtWidget. How do I include this in my programs which use Qt.

Thank you.


Hello Jon,

The source of TQtWidget is in $ROOTSYS/qt package
However to integrate TCanvas into your Qt application you do not need the source.
What you need are

  1. The TQtWidget header file. That should be resided into your $ROOTSYS/include directory
  2. libGQt.so shared library. That you should be found in your $ROOTSYS/lib

as an option if you want to use

  1. Qt Designer
    You may have wanted TQtWidget.cw - Qt designer “Custom Widget” definition
    (see: doc.trolltech.com/3.3/designer-manual-7.html )
    It can be found under $ROOTSYS/qt/inc/TQtWidget.cw
    (see: root.bnl.gov/QtRoot/inc/TQtWidget.cw.txt also)
    Of cource the better place for this file would be $ROOTSYS/include

  2. Qt "Qmake"
    you may have wanted Rootcint.pri - Qt “qmake” include file
    see: root.bnl.gov/QtRoot/QtRoot.html#qmake
    This file would be good to move under $ROOTSYS/include also.

Let me know what else you need to go ahead I’ll be happy to provide you a further assistance.