Qt Quick - What about the future of TableView and TableViewColum?
-
I'm using Qt Quick 5.13 for several projects, some of them require a data grid with a column header, handling advanced functionalities, among others allowing the user to resize the columns, sort their content, or swap them.
Between the Qt Quick available components, the most suitable for my needs is the TableView component. However, there is some vagueness as to what it really supports. First of all, it seems that 2 versions of this component exist: one for the controls 1.0 and one for the controls 2.0.
Obviously the version belonging to the controls 2.0 is the most interesting for me, because I know the limitations of the controls 1.0 (performance leaks, no high DPI support, ...). However the TableView 2.0 has a serious issue: it no longer provides any kind of TableViewColumn component. In other words, the only way to show a header above my data grid seems to be to have to write it myself, which is a painful work.
For that reason, I wonder if I will still use the version 1.0, despite of its limitations. However several points are unclear for me. For that reason I have the following questions:
- Will the controls 1.0, especially the TableView and the TableViewColumn ones, be tagged as obsolete in a near future, and eventually removed from Qt Quick?
- Is a such TableViewColumn planned in a near future for the TableView 2.0 component?
- As the high DPI support is important for my projects, is it easy to workaround this issue with the TableView 1.0 component? And if yes, how to do that?
- Is there another component like e.g GridView, ListView, ... which already contains a ready-to-use header? If yes, which component should I use instead of the TableView one? Or what is the better choice for my situation, and why?
- Which solution is commonly selected by the developers when they face a such situation?
-
Hi @jeanmilost
I'm not able to answer all your question, but some I can
Will the controls 1.0, especially the TableView and the TableViewColumn ones, be tagged as obsolete in a near future, and eventually removed from Qt Quick?
Yes, they will. AFAIK Qt 5.15 will still contain controls 1 but it should be dropped in the following Qt release (Qt6)
Is a such TableViewColumn planned in a near future for the TableView 2.0 component?
as far as I know, it is planned. But with no time table for it.
As the high DPI support is important for my projects, is it easy to workaround this issue with the TableView 1.0 component? And if yes, how to do that?
No idea :)
Is there another component like e.g GridView, ListView, ... which already contains a ready-to-use header? If yes, which component should I use instead of the TableView one? Or what is the better choice for my situation, and why?
As far as I'm aware, no
-
Hi @J.Hill,
Thank you for these info.Since I have to write my header myself, is there several good examples about how to achieve that? (I.e examples about how to create a header supporting advanced functions such as resizing, item drag and dropping, sorting, checkbox, ...)
Regards
-
@jeanmilost
lmgtfy
https://www.youtube.com/watch?v=oV3aguIZLfgJust watched it, reasonably good tutorial in fact 😉