Results 1 to 2 of 2

Thread: Qt 3.3.4 -> Qt 4.1.2, moc file issue

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

    Default Qt 3.3.4 -> Qt 4.1.2, moc file issue

    Good Afternoon-

    I had an application working in Qt3.3.4, but it was determined that we needed to upgrade to Qt 4+.

    I loaded the Ui file in designer, got the message box saying it was converted to Qt 4, saved it, made a header file with uic (I see with Qt 4 you can't make a .cpp file) and rebuilt my project. I had to convert a lot of stuff that changed, but the files compile now until you hit the first moc file. Here is the error:

    moc_TankInterface.cpp:88: error: 'staticMetaObject' is not a member of 'Ui_HitPt_Viewer'
    moc_TankInterface.cpp:102: error: 'qt_metacast' is not a member of 'Ui_HitPt_Viewer'
    moc_TankInterface.cpp:107: error: 'qt_metacall' is not a member of 'Ui_HitPt_Viewer'

    Ui_HitPt_Viewer is the Ui-class made with uic, TankInterface is the derived class.

    I see when I poke around in Ui_HitPt_Viewer class that there is no Q_OBJECT, and no signal connections. I presume that is the issue. However why aren't there? Shouldn't uic add those in when I generate the header file?

    Thanks,
    -philski

  2. #2
    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: Qt 3.3.4 -> Qt 4.1.2, moc file issue

    Quote Originally Posted by philski
    I see when I poke around in Ui_HitPt_Viewer class that there is no Q_OBJECT, and no signal connections. I presume that is the issue. However why aren't there?
    A lot of things changed in Qt4.

    http://doc.trolltech.com/4.1/designe...tance-approach
    http://doc.trolltech.com/4.1/porting4.html

Similar Threads

  1. file copy in Qt 3.3.4 ?
    By npc in forum Newbie
    Replies: 6
    Last Post: 31st March 2006, 15:43
  2. Replies: 1
    Last Post: 13th February 2006, 11:02

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.