Keyboard: 2 dimesional with ListView/TableView?
-
Hi,
I'd like to build a virtual Keyboard in QML with a Keyboard-Layout defined in cpp with a QStandardItemModel. Every item has a few attributes like "lower character", "upper character", "special character", "color" and so on... The items/keys are arranged in columns and rows in the QStandardItemModel.
Now my question is how do I map this 2D model to an view with a delegate like in ListView. My understanding of the ListView Control is that it can only handle 1D models. When I assign my 2D model to a ListView it only shows the first Column. Is there a way to tell ListView to use the second Column or maybe to show just a row of items from the model?
I also looked at TableView but, if I see it corecctly, it also just support one dimensional models and spreads the rolename of one item over several columns...
GridView won't help either because it shows just the first column of the model (like ListView)
What would you recommend me to do?
Best,
Karl -
Yeah,
that would be my last resort.... creating five QStandardItemModels and assigning them to five different ListViews each for every row....But I was wondering if it would be possible by just using one QStandardItemModel?
Thanks for your answer Andre!
Best,
Karl