Results 1 to 3 of 3

Thread: running moc on what?

  1. #1
    Join Date
    Feb 2006
    Posts
    209
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default running moc on what?

    Hi.
    Let's see if I understand this correctly. I should run moc on files that
    contains the words "Q_OBJECT", "SIGNAL" or "SLOT"?
    That's it? No other files that I need to run it on?

    Is it safe to run it on all files in my Qt project or will it mess things up?

  2. #2
    Join Date
    Jan 2006
    Location
    Ukraine,Lviv
    Posts
    454
    Thanks
    9
    Thanked 27 Times in 27 Posts
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: running moc on what?

    I think qmake run moc only for nededs files
    Or you run moc manually
    a life without programming is like an empty bottle

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: running moc on what?

    Quote Originally Posted by Morea
    I should run moc on files that
    contains the words "Q_OBJECT", "SIGNAL" or "SLOT"?
    That's it? No other files that I need to run it on?
    You have to run moc only on those files that contain Q_OBJECT macro.

    Is it safe to run it on all files in my Qt project or will it mess things up?
    It shouldn't, but if you use qmake, it will do the job for you and you don't have to worry about anything (except for running qmake when you add or remove Q_OBJECT somewhere).

Similar Threads

  1. Invoking MOC w/MSVS + Qt Visual Integration
    By WinchellChung in forum Newbie
    Replies: 4
    Last Post: 10th August 2010, 22:56
  2. Replies: 7
    Last Post: 24th November 2008, 11:22
  3. moc with same file names?
    By cjhuitt in forum Qt Programming
    Replies: 9
    Last Post: 27th April 2007, 20:36
  4. QThread: Destroyed while thread is still running
    By Shuchi Agrawal in forum Newbie
    Replies: 8
    Last Post: 3rd April 2007, 06:27
  5. Passing global defines to moc
    By NTwoO in forum Qt Programming
    Replies: 6
    Last Post: 2nd April 2007, 11:23

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.