Results 1 to 4 of 4

Thread: Undefined interface

  1. #1
    Join Date
    Sep 2009
    Location
    Warsaw/Poland
    Posts
    56
    Thanks
    8
    Thanked 4 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Undefined interface

    Hello
    I've got error in cmake:

    Qt Code:
    1. Error: Undefined interface in line: Q_INTERFACES(QTextObjectInterface)
    To copy to clipboard, switch view to plain text mode 

    Qt Code:
    1. #include <QObject>
    2. #include <QTextObjectInterface>
    3.  
    4. class ImageHandler : public QObject, public QTextObjectInterface
    5. {
    6. Q_OBJECT
    7. Q_INTERFACES(QTextObjectInterface)
    8. public:
    9. ImageHandler(TextDocument *doc);
    10. QSizeF intrinsicSize(QTextDocument *doc, int posInDoc, const QTextFormat &format);
    11. void drawObject(QPainter *painter, const QRectF &rect, QTextDocument *doc, int posInDoc, const QTextFormat &format);
    12.  
    13. private:
    14. QTextObjectInterface *m_defaultImageHandler;
    15.  
    16. };
    To copy to clipboard, switch view to plain text mode 

    what I must add to cmake ? or into code ?

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Undefined interface

    Where is your Q_DECLARE_INTERFACE ?

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

    Default Re: Undefined interface

    Please provide a minimal example reproducing the problem.
    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.


  4. #4
    Join Date
    Sep 2009
    Location
    Warsaw/Poland
    Posts
    56
    Thanks
    8
    Thanked 4 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Undefined interface

    Quote Originally Posted by fatjuicymole View Post
    Where is your Q_DECLARE_INTERFACE ?
    This is not my code, I insert 2 files from http://download.hyves.org/kwekker2/H...src-1.3.tar.gz (HyvesDesktop) for animated icons but I can't compile it.
    This problem is part of http://www.qtcentre.org/forum/f-qt-p...dit-24431.html ...

    Qt Code:
    1. HyvesDesktop-src-1.2$ grep -R Q_DECLARE_I *
    2. 3rdparty/iris/irisnet/corelib/irisnetplugin.h:Q_DECLARE_INTERFACE(XMPP::IrisNetProvider, "com.affinix.irisnet.IrisNetProvider/1.0")
    3. 3rdparty/iris/irisnet/corelib/irisnetplugin.h:Q_DECLARE_INTERFACE(XMPP::NetInterfaceProvider, "com.affinix.irisnet.NetInterfaceProvider/1.0")
    4. 3rdparty/iris/irisnet/corelib/irisnetplugin.h:Q_DECLARE_INTERFACE(XMPP::NameProvider, "com.affinix.irisnet.NameProvider/1.0")
    5. 3rdparty/iris/irisnet/corelib/irisnetplugin.h:Q_DECLARE_INTERFACE(XMPP::ServiceProvider, "com.affinix.irisnet.ServiceProvider/1.0")
    6. 3rdparty/qca/include/QtCrypto/qcaprovider.h:Q_DECLARE_INTERFACE(QCAPlugin, "com.affinix.qca.Plugin/1.0")
    7. src/plugger/CXXPluginInterface.h:Q_DECLARE_INTERFACE(Plugger::CXXPluginInterface,
    To copy to clipboard, switch view to plain text mode 
    I don't see Q_DECLARE_INTERFACE for TextDocument.h
    Attached Files Attached Files
    Last edited by mero; 14th November 2009 at 16:22.

Similar Threads

  1. QPSQL problem
    By LoneWolf in forum Installation and Deployment
    Replies: 60
    Last Post: 4th November 2009, 14:22
  2. Undefined reference to crt
    By derektaprell in forum Installation and Deployment
    Replies: 0
    Last Post: 20th October 2009, 08:34
  3. how to add static library into qmake
    By Namrata in forum Qt Tools
    Replies: 1
    Last Post: 20th November 2007, 17:33
  4. error undefined reference ...............
    By amit_pansuria in forum Qt Programming
    Replies: 2
    Last Post: 8th June 2007, 14:28
  5. how to correctly compile threads support?
    By srhlefty in forum Installation and Deployment
    Replies: 9
    Last Post: 25th June 2006, 19:15

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.