Results 1 to 5 of 5

Thread: problem with interface Class - Error:undefined interface

  1. #1
    Join Date
    May 2012
    Posts
    33
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default problem with interface Class - Error:undefined interface

    im trying to test a plugin based application... so as u know i have an interface and then a plug-in which manipulate the interface... i think everything is OK but i face with this error>>
    ( error: Undefined interface)
    . here is my code... how knows wahts the problem

    //// pro file
    #-------------------------------------------------
    #
    # Project created by QtCreator 2012-08-11T13:34:07
    #
    #-------------------------------------------------

    QT += core

    QT -= gui

    TARGET = CAlPlugin_Based
    CONFIG += console
    CONFIG -= app_bundle



    TEMPLATE = app


    SOURCES += main.cpp

    HEADERS += \
    EvaluateInterface.h\
    Evaluate.h

    //// Evaluate.h file
    #ifndef EVALUATE_H
    #define EVALUATE_H

    #include<EvaluateInterface.h>

    class evaluate : public evaluateInterface
    {
    Q_OBJECT
    Q_INTERFACES(evaluateInterface)

    public:
    QString name1() const;
    int evaluate1(int num1, int num2) const;
    };

    #endif // EVALUATE_H


    //// EvaluateInterface.h

    #ifndef EVALUATEINTERFACE_H
    #define EVALUATEINTERFACE_H



    class evaluateInterface
    {
    public:
    virtual ~evaluateInterface(){}

    virtual QString name1() const=0;
    virtual int evaluate1(int num1,int num2) const=0;
    };
    Q_DECLARE_INTERFACE(evaluateInterface,"CaaaalInter face/1.0")

    #endif // EVALUATEINTERFACE_H



    Whats the problem then... thank u alll

  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: problem with interface Class - Error:undefined interface

    It might be the space in there: "CaaaalInter face/1.0", but i'm not sure about that, and please don't post the same question in many sub-forums.

  3. #3
    Join Date
    May 2012
    Posts
    33
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: problem with interface Class - Error:undefined interface

    no space is there... ok

  4. #4
    Join Date
    Sep 2011
    Posts
    1,245
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: problem with interface Class - Error:undefined interface

    if you use code tags it will be easier for everyone to read.
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  5. #5
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    4,302
    Thanks
    243
    Thanked 677 Times in 667 Posts
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: problem with interface Class - Error:undefined interface

    Class "evaluate" declares Q_OBJECT but is not derived from QObject.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Replies: 1
    Last Post: 12th August 2012, 18:37
  2. Problem with my C++ library that uses a interface class
    By maxoreli in forum Qt Programming
    Replies: 2
    Last Post: 4th January 2012, 15:33
  3. Replies: 9
    Last Post: 25th March 2011, 22:40
  4. Replies: 1
    Last Post: 17th January 2011, 05:18
  5. Undefined interface
    By mero in forum Qt Programming
    Replies: 3
    Last Post: 14th November 2009, 17: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.