Page 2 of 2 FirstFirst 12
Results 21 to 22 of 22

Thread: Problems with Q_OBJECT macro

  1. #21
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Problems with Q_OBJECT macro

    Don't use any IDEs if you want to pinpoint a problem. Use plain qmake && make combination, it's the most reliable you can get.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. #22
    Join Date
    May 2008
    Location
    duesseldorf, germany
    Posts
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problems with Q_OBJECT macro

    First of all:
    The output you're reporting is simply the message of Eclipse complaining that it can't run the debugger after your program crashed, so your Eclipse isn't set up properly.

    So set up your gdb in Eclipse, start the program in debug mode and see where it crashes. Figure out what's wrong (possible not initialized ptr / member) and fix it.

    Aren't you used to work with debuggers

    Another thing:
    It makes perfectly sense that the upd slot isn't available on connection w/o moc generating the meta info for your QObject.
    The other slots you're connecting are already defined in QWidget (which gets inherited by QwtPlot), which has the macro, so they are known.

    Make sure you dig again trough the Qt documentation and get the difference between an C++ object (which you get by subclassing) and Qt META objects (which require an additional Q_OBJECT macro to be created).
    See QObject::staticMetaObject() ...

    Hope this helps somehow to get things together and didn't confuse too much

    regards,
    Bjoern

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.