Hello everyone,
I'm a newer for Qt, so pls forgiving the stupid question I asked,thanks in advance.
here is the situation :
I want to structure a class which need inherit from both class QFile and class QXmlStreamReader. then I did like this,
Qt Code:
#ifndef STREAMMANAGER_H #define STREAMMANAGER_H #include <QFile> #include <QXmlStreamReader> { public: private: }; #endif STREAMMANAGER_HTo copy to clipboard, switch view to plain text mode
but now in main.cpp, I want open a xml file, I just don't know how to do that, as usuall, I will use QFile Object, something like "QFile *file = new QFile("/ex/ex.xml");"
, but ,how can I do now?
Qt Code:
.... .... int main(int argc, char *argv[]) { StreamManager *mym = new StreamManager(); return app.exec(); }To copy to clipboard, switch view to plain text mode
one more thing, class StreamManager is a inherited class, and I found I can't create it's own initialized function,what wrong?
Many thanks!
Bookmarks