Results 1 to 15 of 15

Thread: Creating slots with Q_OBJECT

Threaded View

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

    Default Re: Creating slots with Q_OBJECT

    It becomes extremely annoying when I have to deal with things like qmake and nmake, which I have dealt with in linux, and it's extremely annoying to do. Which is why i found the template file, which should have done all this for me. I even tried an example i found right out of the documentation of trolltech, and not anywhere did i see a #include moc, or any other compiler options to be set anywhere. It would be easier if there was something I could do, so that I wouldn't have to do this. I do not understand the link you have sent me, now unless I spend 2 hours reading every little document about it, I won't be able to build this.

    From what you've told me, all I understand is that Qt has some extra things that needs to be done in order to understand things like "emit" "slots" "signals" and instead of them doing all the work in some header file, as I've seen in windows (excuse me for saying, but my only GUI experience is HEAVY and Lengthy use of Win32 API, which is difficult and buggy, so I used Qt hoping it would be easier, but with all these external libraries and compile this and use this program to attach this and that , it becomes more of a hassle than a helpful library), I have to now do something in order to compile these moc files, which I don't even know where they come from or what makes them... I'm suppose to include something that doesn't exist...

    I usually use Visual Studio .NET 2003, but it can get very very annoying when setting up the settings, and the template file I thought handled most of it, but it seems I still have 3 bulky DLLs which i don't know how to link to my program as "lib" or "a" files. So how do I do this? Does anyone have "dummy steps" without going into too much technical detail about the library itself? (keep in mind, that I am only experienced in pure C++ and winAPI not these kinds of libraries etc) How do I make these moc files, and if possible, do you think it can be applied into the DevC++ template file? I also think i don't need the little command that says ActiveQt because I will never use ActiveX anything.

    EDIT:
    I seperated my file to a .h too.
    Ok so I used moc in my bin directory, as such: moc -o QTmain.moc QTmain.h
    And it made the moc file, which I then added to my DevC++ project. So I did basically what you guys wanted me to do, which was to have this moc file integrated to my program.

    [Linker error] undefined reference to `MyWidget::staticMetaObject'
    [Linker error] undefined reference to `vtable for MyWidget'
    and i got the same results.
    Last edited by VireX; 14th January 2007 at 03:15.

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.