Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. TableViewColumn/TableView is not a type
Forum Updated to NodeBB v4.3 + New Features

TableViewColumn/TableView is not a type

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
4 Posts 4 Posters 6.9k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nnicou
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    1
    • G Offline
      G Offline
      Gianfranco Facchini
      wrote on last edited by
      #2

      I have the same problem. If i upgrade QtQuick.Controls 1.4 when i run the program i have the same error. Why ?

      1 Reply Last reply
      0
      • IzowiuzI Offline
        IzowiuzI Offline
        Izowiuz
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        1
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          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 :-)
          }
          

          (Z(:^

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved