Results 1 to 18 of 18

Thread: create a Class inherits from two QObject subclasses

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 541 Times in 521 Posts

    Default Re: create a Class inherits from two QObject subclasses

    Qt Code:
    1. class MyClass : public Class1
    2. {
    3. Q_OBJECT
    4.  
    5. protected:
    6. MyThread *mThread;
    7.  
    8. public:
    9. MyClass(QObject* = NULL);
    10. ~MyClass();
    11.  
    12. //expose QThread API
    13. void start() {
    14. mThread->start();
    15. }
    16. .. you can add other QThread methods and slots here
    17. }
    To copy to clipboard, switch view to plain text mode 

    Here MyThread is a QThread subclass.

  2. The following user says thank you to marcel for this useful post:

    sabeesh (28th December 2007)

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
  •  
Qt is a trademark of The Qt Company.