Results 1 to 15 of 15

Thread: Creating slots with Q_OBJECT

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #9
    Join Date
    Jan 2007
    Posts
    209
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    34
    Thanked 2 Times in 2 Posts

    Default Re: Creating slots with Q_OBJECT

    Sorry I cannot edit anymore.
    Anyway, my main questions now is:
    1) How do I make simple pro files, and then do : nmake \n qmake? in the folder with the pro file? And this will get rid of this bug?
    2) What does qmake do, that my compiler (MingW) with DevC++ does not do?-- What is missing in my project that's not missing when people use qmake? I've tried using "moc.exe" to create a .moc file for my header file in my project. I tried including it in my project, and still same linker errors.

    From what I understand, the linker errors are a result of not being able to find the QStaticMetaObject stuff that MOC makes when we macro Q_OBJECT, Because it declares classes and functions to be used, but doesn't implement it. So how can I implement it so that it will stop linker errors? (hopefully without using qmake)

    EDIT: ok this time, I just took the whole moc file, and I just pasted it at the bottom of my cpp file : QTmain.cpp I removed the "include QTmain.h" from the moc code.
    However, this is still a problem, because that means I have to make an moc file everytime and include that or paste it whatever everytime. Is there an easier way?
    Last edited by VireX; 15th January 2007 at 22:49.

Similar Threads

  1. Signals and Slots question
    By Thoosle in forum Qt Programming
    Replies: 5
    Last Post: 5th December 2006, 00:24
  2. Adding slots in Designer
    By jamos in forum Qt Tools
    Replies: 5
    Last Post: 18th May 2006, 23:28
  3. Problem in creating thread in GUI application
    By jyoti kumar in forum Qt Programming
    Replies: 2
    Last Post: 15th May 2006, 12:05
  4. Problem with Signal and Slots
    By Kapil in forum Installation and Deployment
    Replies: 2
    Last Post: 10th February 2006, 08:51
  5. Missing slots
    By Mariane in forum Newbie
    Replies: 1
    Last Post: 5th February 2006, 01:50

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
  •  
Qt is a trademark of The Qt Company.