Results 1 to 3 of 3

Thread: deleting QListItemWidget crashed which was triggered by another thread

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2006
    Posts
    849
    Thanks
    6
    Thanked 163 Times in 151 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: deleting QListItemWidget crashed which was triggered by another thread

    i) indeed, with DirectConnection the call will be executed in the wrong thread. Not good

    ii) you have to use qRegisterMetaType.
    Probably as
    Qt Code:
    1. qRegisterMetaType<Log::LogLevel>("Log::LogLevel");
    To copy to clipboard, switch view to plain text mode 
    (i.e. you have to include the namespace/class name, I think).

    If this does not fix it:
    Could you be more elaborate on what "won't work" means?

    HTH

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

    zeopha (2nd August 2008)

  3. #2
    Join Date
    Aug 2008
    Posts
    5
    Thanks
    3

    Default Re: deleting QListItemWidget crashed which was triggered by another thread

    U r so kind!
    thank u very much!

    It succeeds without any complains, even no crash which I mentoned above after registering my data type according to your suggestions.

    So, I think that crash was caused by the incorrect usage of the connect between slots and signals. that is, thread used functions which was located in other threads, which will cause some uncertain results.

    Again, thank u very much!


    Quote Originally Posted by caduel View Post
    i) indeed, with DirectConnection the call will be executed in the wrong thread. Not good

    ii) you have to use qRegisterMetaType.
    Probably as
    Qt Code:
    1. qRegisterMetaType<Log::LogLevel>("Log::LogLevel");
    To copy to clipboard, switch view to plain text mode 
    (i.e. you have to include the namespace/class name, I think).

    If this does not fix it:
    Could you be more elaborate on what "won't work" means?

    HTH

Similar Threads

  1. Replies: 1
    Last Post: 2nd August 2008, 10:05
  2. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 06:13
  3. Replies: 10
    Last Post: 20th March 2007, 22:19

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.