Hi guys,
I have followed the instructions at
root.bnl.gov/QtRoot/How2Install4Unix.html#long
and Installed Qt 4.6.2 and ROOT V5.29/02. At this point I am trying to replicate the code from the 26 ROOT/Qt Integration Interfaces. The first two examples compiled fine with the right flags for Qt4 and I am stuck at the third one.
I have created the following files (see attached)
MyButton.pro (Will not let me attach this one)
TEMPLATE = lib dll thread
# Input
HEADERS += TMyQButton.h
SOURCES += TMyQButton.cxx
CREATE_ROOT_DICT_FOR_CLASSES = ${HEADERS} LinkDef.h
include("$(ROOTSYS)/include/rootcint.pri")
LinkDef.h
TMyQButton.cxx
TMyQButton.h
I get
qmake MyButton.pro
Project MESSAGE: Found Qt extensions library !!!
WARNING: Failure to find: MyButtonDict.cxx
make
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../Qt-4.6.2/mkspecs/linux-g++-64 -I. -I../../../Qt-4.6.2/include/QtCore -I../../../Qt-4.6.2/include/QtGui -I../../../Qt-4.6.2/include -I/home/radu/Desktop/QtRoot/root/include -I/home/radu/Desktop/QtRoot/root/include -I. -o TMyQButton.o TMyQButton.cxx
TMyQButton.cxx: In member function ‘void TMyQButton::SetOn(Bool_t)’:
TMyQButton.cxx:21:12: error: ‘class QPushButton’ has no member named ‘setOn’
TMyQButton.cxx: In member function ‘void TMyQButton::SetStyle(const char*)’:
TMyQButton.cxx:27:26: error: no matching function for call to ‘QPushButton::setStyle(const char*&)’
../../../Qt-4.6.2/include/QtGui/qwidget.h:239:10: note: candidate is: void QWidget::setStyle(QStyle*)
make: *** [TMyQButton.o] Error 1
I am a bit confused by the WARNING: Failure to find: MyButtonDict.cxx (I am assuming this is causing the errors when the code is compiled). Please advise me on how to fix this problem and if possible explain why it happened.
Radu
TMyQButton.h (392 Bytes)
TMyQButton.cxx (1004 Bytes)
LinkDef.h (157 Bytes)