Results 1 to 2 of 2

Thread: How to use Qt::QueuedConnection?

  1. #1
    Join Date
    Dec 2006
    Posts
    211
    Thanks
    27
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Question How to use Qt::QueuedConnection?

    Hi All,

    I m using Qt 4.1.5 on my MAC.

    I m emitting a Signal with QString as a argument from a Thread as passing it in a SLOT as

    SLOT(ShowRoot(const QString&, const QString&)

    In which I am passing QString from SIGNAL and use these QString to set the TreeWidgetItem text.

    I want to use a Queued connecion so that when I emit a Signal it will show as one by one in the TreeWidget.

    But I am unable to use Qt::Queued connction because I think the QString should be passes as a Meta object but I am not able to do that.


    So If any body knows then plz help me out.

    Thanks.

  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: How to use Qt::QueuedConnection?

    It is OK if you use QString with Qt::QueuedConnection.
    Anyway, if you made the implementation, you already use QueuedConnection, since it is the default across threads.

    But note that nothing guarantees that the items will be created sequentially. It depends on the GUI thread load. They might not even show up in the order you expect.

    Regards

  3. The following user says thank you to marcel for this useful post:

    vishal.chauhan (30th July 2007)

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.