Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. 2D array with dyanamic size
Qt 6.11 is out! See what's new in the release blog

2D array with dyanamic size

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 5.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MyQT
    wrote on last edited by
    #1

    Hi,

    I have created two dimentional array @QString Data[10][20]@ with constant size..
    Now My application is demanding that array size should be dyanamic.

    What is the best way to implement two dimentional array with dyanamic size.

    I am using this array to store the data of tableview.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      trollixx
      wrote on last edited by
      #2

      If you are implementing storage for your custom model you may use a sort of QVector<QVector<QString> > to have dynamically sized matrix, or just go with QStandardItemModel which provides ready to use storage.

      Oleg

      1 Reply Last reply
      0
      • S Offline
        S Offline
        stereomatching
        wrote on last edited by
        #3

        How about Boost multiArray?
        or QVector<QStringList>?
        std::vector<QStringList>?

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved