[CMake] how to get cmake and custom qt widget to work?

John Drescher drescherjm at gmail.com
Tue Oct 5 15:02:04 EDT 2010


On Tue, Oct 5, 2010 at 2:59 PM, eial at cs.bgu.ac.il <eial at cs.bgu.ac.il> wrote:
>
> hello.
> I have a cmake+qt4 project, I needed to extend a certain gui item to suit my needs, I've been able to insert it into qtcreator and incorporate it into the project's gui, now when I run compilation, I get this:
> /home/dagg/workspace/OSSM/src/GUI/ui_TrainingActivityManager.h:29:28: error: qstringspinbox.h: No such file or directory
>
> the relevant part of /home/dagg/workspace/OSSM/src/GUI/ui_TrainingActivityManager.h is this:
> /********************************************************************************
> ** Form generated from reading UI file 'TrainingActivityManager.ui'
> **
> ** Created: Tue Oct 5 20:29:00 2010
> **      by: Qt User Interface Compiler version 4.6.3
> **
> ** WARNING! All changes made in this file will be lost when recompiling UI file!
> ********************************************************************************/
>
> #ifndef UI_TRAININGACTIVITYMANAGER_H
> #define UI_TRAININGACTIVITYMANAGER_H
>
> #include <QtCore/QLocale>
> #include <QtCore/QVariant>
> #include <QtGui/QAction>
> #include <QtGui/QApplication>
> #include <QtGui/QButtonGroup>
> #include <QtGui/QDialog>
> #include <QtGui/QDialogButtonBox>
> #include <QtGui/QFormLayout>
> #include <QtGui/QGridLayout>
> #include <QtGui/QHeaderView>
> #include <QtGui/QLabel>
> #include <QtGui/QLineEdit>
> #include <QtGui/QPushButton>
> #include <QtGui/QTreeWidget>
> #include <QtGui/QVBoxLayout>
> #include <QtGui/QWidget>
> #include <qstringspinbox.h>  // line 28
>
> QT_BEGIN_NAMESPACE
>
> class Ui_TrainingActivityManager
> {
> public:
>    QTreeWidget *mTrainActManList;
>    QWidget *layoutWidget;
>
> how can I make cmake work with this plugin, I've putted the hpp and cpp of the plugin within one of my sub project's src folder, also the file is called qstringspinbox.hpp.
>
> any help would be appreciated.
>
The problem is most likely with your CMakeLists.txt

John


More information about the CMake mailing list