Hello,

I have been trying to create a plugin for OpenSG and Qt4 support and came up
with  the following error....

g++ -c -pipe -fpermissive -O2 -D_REENTRANT -Wall -W -fPIC -DQT_SHARED
-DQT_NO_DEBUG -DQT_PLUGIN -DQT_SCRIPT_LIB -DQT_XML_LIB -DQT_GUI_LIB
-DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS -I/usr/share/qt4/mkspecs/linux-g++
-I. -I/usr/include/qt4/QtDesigner -I/usr/include/qt4/QtCore
-I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui
-I/usr/include/qt4/QtXml -I/usr/include/qt4/QtXml
-I/usr/include/qt4/QtScript -I/usr/include/qt4/QtScript -I/usr/include/qt4
-I. -I. -I. -o OSGQT4plugin.o OSGQT4plugin.cpp
OSGQT4plugin.cpp: In member function 'virtual QWidget*
OSGQT4plugin::createWidget(QWidget*)':
OSGQT4plugin.cpp:53: error: expected type-specifier before
'OSGQGLManagedDesignerWidget'
OSGQT4plugin.cpp:53: error: cannot convert 'int*' to 'QWidget*' in return
OSGQT4plugin.cpp:53: error: expected ';' before
'OSGQGLManagedDesignerWidget'
OSGQT4plugin.cpp:53: error: 'OSGQGLManagedDesignerWidget' was not declared
in this scope
OSGQT4plugin.cpp: At global scope:
OSGQT4plugin.cpp:57: error: expected constructor, destructor, or type
conversion before '(' token
make: *** [OSGQT4plugin.o] Error 1




The file structure is as follows:



*****************************************


#include <QDesignerCustomWidgetInterface>


class OSGQT4plugin : public QObject,public QDesignerCustomWidgetInterface
{

  Q_OBJECT
  Q_INTERFACES(QDesignerCustomWidgetInterface)


    public:

  OSGQT4plugin(QObject *parent = 0);


  QString name() const;
  QString includeFile() const;
  QString group() const;
  QIcon icon() const;
  QString toolTip() const;
  QString whatsThis() const;
  bool isContainer() const;
  QWidget *createWidget(QWidget*);


};


********************************************************************



#include "OSGQT4plugin.h"


OSGQT4plugin::OSGQT4plugin(QObject *parent)
  : QObject(parent)
{

}


QString OSGQT4plugin::name() const
{
  return "OpenSG_QT4";
}


QString OSGQT4plugin::includeFile() const
{
  return "/usr/local/include/OpenSG/OSGQ4GLManagedDesignerWidget_qt.h";
}


QString OSGQT4plugin::group() const
{
  return tr("OpenSG & Qt4 integration");
}

QIcon OSGQT4plugin::icon() const
{
}


QString OSGQT4plugin::toolTip() const
{
  return tr("An OpenSG Interface Makerx");
}


QString OSGQT4plugin::whatsThis() const
{

}


bool OSGQT4plugin::isContainer() const
{
  return false;
}



/*
This is where the i get  the error
OSGQGLManagedDesignerWidget() constructot returns int* pointer
*7
QWidget *OSGQT4plugin::createWidget(QWidget *parent)
{
  return new OSGQGLManagedDesignerWidget(parent);
}


Q_EXPORT_PLUGIN2(osgqt4plugin,OSGQT4plugin)


*************************************************************


Edited the .pro file as well so  that the created plugin could be copied in
the QT's plugin directory



Any idea?



Cheers
Sajjad
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to