When reading this, please keep in mind that I'm fairly n00b to linux. I'm running Ubuntu 8.04.
I was playing around with the padnavigator example.
I tried to copy it into my own widget, I started getting all kind of errors for not finding header files.
Then I went to the old version of my widget and just tried to include:
#include <QGraphicsWidget>
#include <QGraphicsWidget>
To copy to clipboard, switch view to plain text mode
The compiler says it can't find it.
The padnavigator example compiles fine, but the header declaration is different:
#include <QtGui/qgraphicswidget.h>
#include <QtGui/qgraphicswidget.h>
To copy to clipboard, switch view to plain text mode
I try this header in my own widget, and the compiler still can't find the header.
I then tried comparing the two make files.
In padnavigator's make:
In my make there's:
INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I.
INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I.
To copy to clipboard, switch view to plain text mode
In the padnavigator make there's:
INCPATH = -I../../../mkspecs/linux-g++ -I. -I../../../include/QtCore -I../../../include/QtCore -I../../../include/QtGui -I../../../include/QtGui -I../../../include/QtOpenGL -I../../../include/QtOpenGL -I../../../include -I/usr/X11R6/include -I.moc/release-shared -I.uic/release-shared
INCPATH = -I../../../mkspecs/linux-g++ -I. -I../../../include/QtCore -I../../../include/QtCore -I../../../include/QtGui -I../../../include/QtGui -I../../../include/QtOpenGL -I../../../include/QtOpenGL -I../../../include -I/usr/X11R6/include -I.moc/release-shared -I.uic/release-shared
To copy to clipboard, switch view to plain text mode
Just FYI, the padnavigator code is located on my desktop:
/home/nibbles/Desktop/qt-x11-opensource-src-4.4.2/examples/graphicsview/padnavigator
/home/nibbles/Desktop/qt-x11-opensource-src-4.4.2/examples/graphicsview/padnavigator
To copy to clipboard, switch view to plain text mode
So what I think is happening, is that qmake somehow automatically determines the location of the include paths when making the make file. Is correct?
Next, the include path for my own widget's makefile appears to be wrong. When I do a "make install" from the source code located on my desktop, everything is installed to /usr/local/Trolltech/Qt-4.4.2/ and not /usr/include/qt4/ . I assume the latter is the Qt version that was already on the system when I installed ubuntu.
I understand that these questions are probably more relevant to Linux or Ubuntu rather than any Qt, but I don't really know where else to start asking.
Nonetheless, how can I force qmake to build the makefile so it uses the libraries and headers for the new installation of Qt?
Bookmarks