Important: Please read the Qt Code of Conduct -

How to define Qbytearray 2Dimension in Qt??

  • Hi, i want to use QByteArray in my source, but i need 2 Dimension QbyteArray.i saw doc Qt for 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

  • 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 useQVector<QVector<char> > as an alternative

Log in to reply