Usage about QHash or QMap for 2-D array



  • https://www.dropbox.com/s/63pv951to7gux1d/qmap.png

    I want mapping this 2d array table to QHash or QMap

    Could you suggest appropriate Example about how can I design above 2-d table to QHash or QMap?

    Thank you



  • Unfortunately I cannot see the picture because dropbox is blocked here.

    However, using QHash or QMap depends on if you need an order or not. Also you have to consider that the key of the QHash needs a global qHash function.
    You can use any type for the value so you can put a QMap into a QMap as well as QPair or something else which defines some kind of table or even a relation.

    Hope this helps a bit.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.