Results 1 to 4 of 4

Thread: call other class function using object in Run() method of Thread class

  1. #1
    Join Date
    May 2007
    Posts
    110
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X

    Default call other class function using object in Run() method of Thread class

    hi

    ///first file

    #include "Guiclass.h"
    ////
    void threadclass::run()
    {
    Guiclass *obj = NULL;
    obj = new GuiClass;
    while(!bFalse)
    {
    obj->func();
    }
    }

    ////Gui class
    void Guiclass::func()
    {
    ///
    }


    But it is not working...program becomes crashed...why

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

    Default Re: call other class function using object in Run() method of Thread class

    Come on, man!
    It is stated in several posts:
    DO NOT CREATE/MODIFY WIDGETS FROM OTHER THREADS!!!

  3. #3
    Join Date
    May 2007
    Posts
    110
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: call other class function using object in Run() method of Thread class

    can u give some example for this....i have some confusion




    Quote Originally Posted by marcel View Post
    Come on, man!
    It is stated in several posts:
    DO NOT CREATE/MODIFY WIDGETS FROM OTHER THREADS!!!

  4. #4
    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: call other class function using object in Run() method of Thread class

    You have been given an infraction for multiposting. This thread is now being closed. Please continue in the original thread and for God's sake read what Marcel writes you

Similar Threads

  1. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 07:13

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.