for isssue
va.cpp: In member function 'virtual void vA1::initGui()':
va.cpp:98: error: no matching function for call to 'QAction::QAction(QIcon, const char [4], vA1* const)'
/usr/local/Trolltech/Qt-4.1.2//include/QtGui/qaction.h:173: note: candidates are: QAction::QAction(const QAction&)
...
va.cpp: In member function 'virtual void vA1::initGui()':
va.cpp:98: error: no matching function for call to 'QAction::QAction(QIcon, const char [4], vA1* const)'
/usr/local/Trolltech/Qt-4.1.2//include/QtGui/qaction.h:173: note: candidates are: QAction::QAction(const QAction&)
...
To copy to clipboard, switch view to plain text mode
i found that i hadn't included QObject class which i did so up mentioned error went away.
About second issue of
usr/local/Trolltech/Qt-4.1.2//include/QtGui/qmenubar.h:29: error: expected initializer before 'QtGuiModule'
usr/local/Trolltech/Qt-4.1.2//include/QtGui/qmenubar.h:29: error: expected initializer before 'QtGuiModule'
To copy to clipboard, switch view to plain text mode
i changed my header file as
#ifndef vA_H
#define vA_H
//QT4 includes
#include <QObject>
//QGIS includes
#include <qgisapp.h>
#include <qgsmaptool.h>
#include <qgsmapcanvas.h>
#include<qgspoint.h>
#include "../qgisplugin.h"
#include "vARubberBand.h"
;
//forward declarations
/**
* \class Plugin
* \brief [name] plugin for QGIS
* [description]
*/
class vA1
:public QObject,
public QgsMapTool ,
public QgisPlugin
{
Q_OBJECT;
public:
#ifndef vA_H
#define vA_H
//QT4 includes
#include <QObject>
//QGIS includes
#include <qgisapp.h>
#include <qgsmaptool.h>
#include <qgsmapcanvas.h>
#include<qgspoint.h>
#include "../qgisplugin.h"
#include "vARubberBand.h"
;
//forward declarations
class QToolBar;// LINE NO 54
/**
* \class Plugin
* \brief [name] plugin for QGIS
* [description]
*/
class vA1:public QObject, public QgsMapTool , public QgisPlugin
{
Q_OBJECT;
public:
To copy to clipboard, switch view to plain text mode
i think you will be noticing the semicolon after line
#include "vARubberBand.h"
#include "vARubberBand.h"
To copy to clipboard, switch view to plain text mode
, this is what i did a sort of hit and trial to compile it. It did. If i didn't put this semicolon it give the message
va.cpp line 54: multiple types in one declaration
va.cpp line 54: multiple types in one declaration
To copy to clipboard, switch view to plain text mode
i donot have reasoning for such behaviour. Kindly anyone put some light on this issue. All comments, suggestion and other solutions are welcome
reagrds
quickNitin
Bookmarks