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. How to define Qbytearray 2Dimension in Qt??
Forum Updated to NodeBB v4.3 + New Features

How to define Qbytearray 2Dimension in Qt??

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 840 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.
  • stackprogramerS Offline
    stackprogramerS Offline
    stackprogramer
    wrote on last edited by
    #1

    Hi, i want to use QByteArray in my source, but i need 2 Dimension QbyteArray.i saw doc Qt for QByteArray,

    QbyteArray
    my challenge is how i can define 2dimension QByteArray.
    a thing like a matrix array but from Byte.........

    int matrix[500][500];
    

    can any help?
    thanks best regards stackprogramer

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      As the name suggests QByteArray can't do such a thing (although every n-dimension array can be stored in a 1-dimenstion array).

      you can use QVector<QVector<char> > as an alternative

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      2

      • Login

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