Unsolved TableViewColumn/TableView is not a type
-
Greetings,
I have been struggling with a TableView issue the few last days. When i define a TableView in my application i get this error: TableViewColumn is not a type and the same applies for TableView. It worked when i change import QtQuick.Controls 2.0 to import QtQuick.Controls 1.4 but i got so much other problems in my application when changed it. My question is if there is any other way around to fix this?
I did update Qt Creator from 5.7 to 5.8 and now i have imported QtQuick.Controls 2.1.
-
I have the same problem. If i upgrade QtQuick.Controls 1.4 when i run the program i have the same error. Why ?
-
There is currently no TableView in QtQuick.Controls 2.X
Supposedly TV is planned for Qt 5.12 release.
In QtQuick.Controls 2.X I roll my own implementation; using ListView and Repeater in delegates as columns. -
You can mix Controls 1 and 2 in apps. So, keep your UI in Controls2, but take TableView from Controls1 only - should work. To make sure QML engine does not get confused about the imports, you can do something like this:
import QtQuick.Controls 1.4 as OldControls import QtQuick.Controls 2.2 Button { // controls 2, yay! } OldControls.TableView { // controls 1 :-) }