0

A long time ago Digia announced "next generation" item views in upcoming versions of Qt, dubbed ItemViewsNG.

As of version 5.2, it looks like all model/view controls are still based on the old QAbstractItemModel design. Specifically, I'm looking for classes such as QGraphicsListView, but all I can find online are old source code repositories (like this one on Gitorious, without any commits since 2010). Has Digia abandoned this project? What other alternatives can I use if I want more flexible, customized list controls in Qt?

Tony the Pony
  • 40,327
  • 71
  • 187
  • 281
  • alternatives? how about the old QAbstractItemModel? – ratchet freak Mar 28 '14 at 15:31
  • Yes, but I was hoping for something more flexible than the old row/column method of addressing data, as well as better support for customized rendering. – Tony the Pony Mar 28 '14 at 15:40
  • 1
    Back then it would have been Nokia, not Digia. – Mitch Mar 29 '14 at 00:04
  • `QAbstractItemModel` seems rather flexible to me... It is a table, but also a tree, and additionaly each item can have arbitrary number of different data roles. And data is `QVariant`, which includes `QVariantMap` and `QVariantList`... The problem is usually not lack of flexibility, but the opposite, deciding how to map some kind of data to QAIM the best way. – hyde Mar 29 '14 at 10:33
  • If you want really customized rendering, then you should create a QML component which does the rendering (you can use it in a `QWidget` based UI like any other widget). Though it will have trouble with directly accessing tree-like data, I think you'll need a proxy model to massage a tree into a list. – hyde Mar 29 '14 at 10:38

1 Answers1

1

After looking at sources, that looks like something which got abandoned, as attention shifted to Qt Quick. The sources have some mentions of QML, so at the time it seems to have been parallel project. I would not be surprised if it was some kind of reaction to QML being its own language and not C++ and some people not liking the idea, but this is 100% speculation in my part. Disclaimer: not involved with Qt development.


Before looking at sources, I thought the blog was most likely talking about what became Qt Quick 1 and QML in Qt 4.7, which worked in top of the old QGraphicsView framework.

In Qt 5 this has evolved to Qt Quick 2 added to Qt 5 which runs on top of the new scene graph framework and is increasingly useful for traditional desktop applications as new desktop controls get added.

hyde
  • 60,639
  • 21
  • 115
  • 176