Results 1 to 3 of 3

Thread: Qt containers or STL containers?

  1. #1
    Join Date
    Feb 2010
    Posts
    7
    Thanks
    5
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Qt containers or STL containers?

    which should i use and why should i use them when building a multithreaded QT app, the QT container classes or those provided by the STL?
    artificial intelligence is no match for natural stupidity

  2. #2
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Qt containers or STL containers?

    Qt Concurrent supports several STL-compatible container and iterator types, but works best with Qt containers that have random-access iterators, such as QList or QVector...
    Quoted from: doc.trolltech.com

    The answer is: depends on many things (like how do you use threads, what modification you do to data...)
    Recommended reading more here

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

    sparticus_37 (11th May 2010)

  4. #3
    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: Qt containers or STL containers?

    Neither STL nor Qt containers are thread-safe. Both STL and Qt containers are reentrant.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 2
    Last Post: 11th May 2009, 16:50
  2. QVector, containers, deep copy
    By TheKedge in forum Qt Programming
    Replies: 2
    Last Post: 23rd January 2007, 05:45
  3. scrolled widgets containers in Mainwindow
    By antonio.r.tome in forum Qt Programming
    Replies: 1
    Last Post: 24th October 2006, 14:40

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.