Results 1 to 2 of 2

Thread: moc file generation problem in Microsoft Visual Studio with Qt 4.6.0

  1. #1
    Join Date
    Aug 2010
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default moc file generation problem in Microsoft Visual Studio with Qt 4.6.0

    Hello,

    My question is, in a Visual Studio project, when files(.h and .cpp) of a Q_OBJECT class are in the project directory, the moc file for that class is generated successfuly.

    However, when I create a folder for that class inside the project directory and put the .h and .cpp files there, the moc file is not created and as a result linking errors occur.

    Is there a way to solve this problem?
    Thanks...

    P.S: I use Microsoft Visual Studio 2005 with Qt 4.6.0 and Qt Visual Studio Addin 1.1.4

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: moc file generation problem in Microsoft Visual Studio with Qt 4.6.0

    Clean the project and rerun qmake before building the source again.
    Does this help?

Similar Threads

  1. qmake and Microsoft Visual Studio project filters
    By erik in forum Installation and Deployment
    Replies: 1
    Last Post: 11th January 2013, 07:13
  2. .pro file in visual studio
    By chandan in forum Qt Programming
    Replies: 5
    Last Post: 21st May 2010, 14:09
  3. editing *.pro file in Visual Studio
    By estel in forum Newbie
    Replies: 2
    Last Post: 8th February 2010, 07:31
  4. Replies: 3
    Last Post: 14th December 2009, 09:38
  5. Replies: 2
    Last Post: 23rd November 2007, 18:44

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.