Results 1 to 4 of 4

Thread: using QThreads, but i cant access a method of another class

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,540
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanked 284 Times in 279 Posts

    Default Re: using QThreads, but i cant access a method of another class

    You can't get access from another thread to UI. So in MyThread You must create signal with int parameter connected to slot in MainWindow. In this slot You can set new value for lcdNumber.

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

    Tio (15th April 2010)

Similar Threads

  1. How to call super class method from sub class
    By mkkguru in forum Qt Programming
    Replies: 9
    Last Post: 4th February 2010, 05:29
  2. QThreads, QMutexes, and multiple access
    By coderbob in forum Qt Programming
    Replies: 3
    Last Post: 12th January 2010, 16:39
  3. QThread Data Access Method
    By schan117 in forum Qt Programming
    Replies: 7
    Last Post: 18th August 2009, 06:25
  4. How to access myApp->method from a child
    By bnilsson in forum Qt Programming
    Replies: 2
    Last Post: 13th July 2008, 13:22
  5. Replies: 3
    Last Post: 16th May 2007, 11:07

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.