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

Andreas Pakulat apaku at gmx.de
Wed Oct 6 01:14:02 EDT 2010


On 05.10.10 20:59:27, 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:

This file is generated by uic from TrainingActivityManager.ui. If you've
used qstringspinbox.hpp, then you need to put that into the .ui file, so
that uic picks it up and generates the right header code. Or you rename
your header file to .h. How you tell uic to generate an include with
.hpp depends on wether this is a designer plugin or just using the
promoting-feature in Qt designer. The Qt docs will have details on how
to set the proper header filename.

Also make sure that the directory containing the header is in the list
of include-dirs by using include_directories() in cmake.

Andreas

-- 
Cheer Up!  Things are getting worse at a slower rate.


More information about the CMake mailing list