Results 1 to 3 of 3

Thread: QThread::start() doesn't invoke run() method

  1. #1
    Join Date
    Dec 2008
    Posts
    29
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QThread::start() doesn't invoke run() method

    Hi, please give an advice in this case:

    There is an class inheritance hierarchy:
    QThread -> BaseThread -> Itf (abstract) -> ... -> Interface (abstract) -> Implementation,
    where BaseThread reimplements run() method of QThread() and from run() method should be called some virtual protected methods implemented in Implementation class. When I call start() method from constructor of Implementation instance, the BaseThread::run() in not executed(i am sure with this).
    The question is why and where could be error?

    Some notes:
    * BaseThread is implemented in one shared library, Itf in second shared library, Interface and Implementation in third library. The project can be successfully compiled, linked, libraries are loaded without any problems from the main aplication.
    * Creating simple Test : public BaseThread is functional and run() is invoked.
    * run() or start() methods are not reimplemented in the project, except BaseThread::run()
    * All constructors all called in the proper way.

    I would appreciate any advice.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QThread::start() doesn't invoke run() method

    Can we see some code? How are you sure it is not executed?

  3. #3
    Join Date
    Dec 2008
    Posts
    29
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QThread::start() doesn't invoke run() method

    Oh, sorry, my fault. I forget reimplementation of run() in one class inherited in side branch of class inheritance tree.
    Last edited by seim; 5th February 2009 at 17:15.

Similar Threads

  1. Replies: 4
    Last Post: 10th March 2007, 18:01

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.