i create my own class to create xml file, without inherite from any class.
header:
#ifndef __XML_H__
#define __XML_H__
#include <QtGui>
#include <myscene.h>
class XmlGenerator{
Q_OBJECT
public:
private slots:
void createDOM();
private:
//QDomDocument *document;
int indent;
myscene *scene;
};
#endif // __XML_H__
#ifndef __XML_H__
#define __XML_H__
#include <QtGui>
#include <myscene.h>
class XmlGenerator{
Q_OBJECT
public:
XmlGenerator(QString*,myscene*);
private slots:
void createDOM();
private:
//QDomDocument *document;
QTextStream *stream;
int indent;
myscene *scene;
};
#endif // __XML_H__
To copy to clipboard, switch view to plain text mode
source:
#include "xml.h"
XmlGenerator
::XmlGenerator(QString *file,myscene
*s
){
}
void XmlGenerator::createDOM(){
}
#include "xml.h"
XmlGenerator::XmlGenerator(QString *file,myscene *s){
}
void XmlGenerator::createDOM(){
}
To copy to clipboard, switch view to plain text mode
After compiling i had:
"undefined reference to `vtable for XmlGenerator'".......What's wrong?
I also put #include<xml.h> in my main.cpp class
Bookmarks