View Full Version : Qt designer integration and cmake

25th March 2009, 17:17
Qt designer source code generation does not seem to work in cmake based project. I use Visual studio 2008 with Qt4 integration and cmake 2.6. My code compiles fine, but I can't add any more signals when trying to add a slot by double clicking on a widget of my UI file OR select "Connect Signal ..." when right click on the widget.

I saw that someone posted a similar issues but couldn't find any solutions. Please help. Thanks.

25th March 2009, 23:32
Can you add those methods when using Visual Studio with qmake? Honestly qmake nor cmake have nothing to do with the integration so I don't see why would using cmake prevent the integration from working. You might be looking for the problem in a wrong place.

26th March 2009, 15:42
Yes, it works fine without cmake so I'm wondering if it's just some cmake flags that I missed.
I don't know if it's related to my problem or not, but the "Add Qt Class..." and "Add Qt GUI Class..." are not available when I tried to add something new to the project.

26th March 2009, 17:04
How did you create the visual studio project in the first place?

28th April 2009, 15:22
Adding the following line to the CMakeLists.txt fixed the problem

set_target_properties (<project_name> PROPERTIES VS_KEYWORD Qt4VSv1.0)