Results 1 to 20 of 21

Thread: qRegisterMetaType- reference as argument in connect throwing run time error

Hybrid View

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

    Default Re: qRegisterMetaType- reference as argument in connect throwing run time error

    myData obj is destroyed immediately after emiting signal. Slot in another thread is run in the future when the object referenced by reference no longer exists.

  2. #2
    Join Date
    Jun 2015
    Location
    India
    Posts
    185
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: qRegisterMetaType- reference as argument in connect throwing run time error

    Quote Originally Posted by Lesiok View Post
    myData obj is destroyed immediately after emiting signal. Slot in another thread is run in the future when the object referenced by reference no longer exists.
    That is what I clarified in the above reply, myData obj is actually class member of myclass in my original code. It never gets destroyed before worker thread finishes its work.
    Thanks :-)

Similar Threads

  1. Replies: 0
    Last Post: 19th January 2012, 15:52
  2. Replies: 2
    Last Post: 9th May 2011, 10:38
  3. Replies: 6
    Last Post: 9th April 2011, 19:23
  4. qRegisterMetaType - problems with connect()
    By Macok in forum Qt Programming
    Replies: 1
    Last Post: 5th March 2009, 22:55
  5. Replies: 2
    Last Post: 8th October 2007, 15:02

Tags for this Thread

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.