Results 1 to 4 of 4

Thread: use QVector as 2 dimensional Array

  1. #1
    Join Date
    Jul 2009
    Posts
    49
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default use QVector as 2 dimensional Array

    Hai


    How to use QVector as 2 Dimensional Array



    pl help me with some examples...

    Sureee

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: use QVector as 2 dimensional Array

    Qt Code:
    1. QVector<QVector<QString> > array;
    2. // fill the array
    3. QString tmp = array.at(4).at(2);
    To copy to clipboard, switch view to plain text mode 
    is QVector the right class for you? Consider using QList.

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

    jalm (28th September 2011)

  4. #3
    Join Date
    Jul 2009
    Posts
    49
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: use QVector as 2 dimensional Array

    How to use QList as 2 Dimensional Array?


    Pl help me

  5. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: use QVector as 2 dimensional Array

    Quote Originally Posted by umulingu View Post
    How to use QList as 2 Dimensional Array?
    May be you should tell us what you want to achieve with that array.

Similar Threads

  1. QWTPLOT problem
    By umulingu in forum Qwt
    Replies: 5
    Last Post: 25th August 2009, 16:34
  2. Qwt Plot with 2 dimension Array
    By umulingu in forum Qwt
    Replies: 2
    Last Post: 5th August 2009, 16:48
  3. Replies: 0
    Last Post: 4th December 2008, 05:48
  4. Problems passing an array of pointers to objects to a function
    By Valheru in forum General Programming
    Replies: 16
    Last Post: 30th June 2008, 00:11
  5. Problem in converting QString to QChar array?
    By KaKa in forum Qt Programming
    Replies: 2
    Last Post: 19th March 2007, 00:38

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.