Results 1 to 4 of 4

Thread: very little problem

  1. #1
    Join Date
    Feb 2008
    Posts
    102
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question very little problem

    i create my own class to create xml file, without inherite from any class.

    header:
    Qt Code:
    1. #ifndef __XML_H__
    2. #define __XML_H__
    3.  
    4. #include <QtGui>
    5. #include <myscene.h>
    6.  
    7. class XmlGenerator{
    8. Q_OBJECT
    9.  
    10. public:
    11. XmlGenerator(QString*,myscene*);
    12.  
    13. private slots:
    14. void createDOM();
    15.  
    16. private:
    17. //QDomDocument *document;
    18. QTextStream *stream;
    19. int indent;
    20. myscene *scene;
    21.  
    22. };
    23.  
    24. #endif // __XML_H__
    To copy to clipboard, switch view to plain text mode 

    source:
    Qt Code:
    1. #include "xml.h"
    2.  
    3. XmlGenerator::XmlGenerator(QString *file,myscene *s){
    4.  
    5. }
    6.  
    7. void XmlGenerator::createDOM(){
    8.  
    9.  
    10. }
    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

  2. #2
    Join Date
    Apr 2008
    Location
    Pavlodar, Kazakhstan
    Posts
    22
    Thanks
    1
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: very little problem

    You have to inherit your class from QObject in order to use signals and slots mechanism.

  3. #3
    Join Date
    Feb 2008
    Posts
    102
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Unhappy Re: very little problem

    ......the problem persist.........
    Last edited by dreamer; 3rd May 2008 at 09:54. Reason: updated contents

  4. #4
    Join Date
    Feb 2008
    Posts
    102
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Thumbs up Re: very little problem

    ............deleting the compiled file and rigenerating it, it works well...

Similar Threads

  1. problem with paint and erase in frame
    By M.A.M in forum Qt Programming
    Replies: 9
    Last Post: 4th May 2008, 20:17
  2. Tricky problem with ARGB widget / UpdateLayeredWindow
    By nooky59 in forum Qt Programming
    Replies: 3
    Last Post: 21st February 2008, 10:35
  3. Graphics view display problem.
    By kiranraj in forum Qt Programming
    Replies: 3
    Last Post: 20th July 2007, 07:08
  4. Problem with bitBlt
    By yellowmat in forum Newbie
    Replies: 1
    Last Post: 5th April 2006, 14:08
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

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.