Results 1 to 2 of 2

Thread: MVC example not working

  1. #1
    Join Date
    Jun 2010
    Posts
    32
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default MVC example not working

    I am trying implement a MVC model, downloaded the source code from http://doc.trolltech.com/qq/qq10-mvc.html

    But I can't compile, it says following:
    In file included from ..\mvc\palettemodelmanager.cpp:28:
    ..\mvc\/palettemodelmanager.h: In constructor 'PaletteModelManager::PaletteModelManager(QObject* , const char*)':
    ..\mvc\/palettemodelmanager.h:59: error: no matching function for call to 'QObject::QObject(QObject*&, const char*&)'
    ..\..\..\Qt\2010.02.1\qt\include/QtCore/../../src/corelib/kernel/qobject.h:309: note: candidates are: QObject::QObject(const QObject&)
    ..\..\..\Qt\2010.02.1\qt\include/QtCore/../../src/corelib/kernel/qobject.h:293: note: QObject::QObject(QObjectPrivate&, QObject*)
    ..\..\..\Qt\2010.02.1\qt\include/QtCore/../../src/corelib/kernel/qobject.h:128: note: QObject::QObject(QObject*)

  2. #2
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: MVC example not working

    The problem seems to be QObject::QObject(QObject*&, const char*&), the constructor doesn't have that second argument.

    But that example is kind of old, because it uses headers like this: #include <qapplication.h>
    //i think this is Qt3 example, but i'm not sure

    You can try to port that to Qt4, or use some newer resource, like this

Similar Threads

  1. My first app not working
    By Noks in forum Newbie
    Replies: 6
    Last Post: 2nd February 2010, 16:34
  2. accelerator key not working
    By jan in forum Qt Tools
    Replies: 4
    Last Post: 2nd October 2009, 03:30
  3. Working with StyleSheets
    By BingoMaster in forum Newbie
    Replies: 3
    Last Post: 29th September 2009, 16:52
  4. why this program is not working
    By ramamurthy.kv in forum Qt Programming
    Replies: 3
    Last Post: 8th May 2008, 13:26
  5. Mac OS X UI not working
    By hvengel in forum Qt Programming
    Replies: 3
    Last Post: 1st April 2006, 01: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.