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. TableView sort indicator not show

TableView sort indicator not show

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
4 Posts 3 Posters 1.6k Views 1 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.
  • XequtorX Offline
    XequtorX Offline
    Xequtor
    wrote on last edited by
    #1

    Hello All,

    I have created one TableView in the qml with the following code:

    TableView {
                    id: propertiesTable
                    anchors.top: parent.top
                    anchors.bottom: parent.bottom
                    model: XConfigObj.propertiesModel
                    width:parent.width
                    sortIndicatorVisible: true
    
                    TableViewColumn {
                        id: propertiesColumnName
                        role: "name"
                        title: "Name"
                        elideMode: Text.ElideRight
                        width: 200
                    }
                    TableViewColumn {
                        id: propertiesColumnValue
                        role: "value"
                        title: "Value"
                        width: 200
                              ...
    

    I have set the visibility of the indicator to true but I it is not displayed on my table:

    alt text

    Is there anything else that I should set?

    Best Regards

    1 Reply Last reply
    1
    • D Offline
      D Offline
      DBigler
      wrote on last edited by
      #2

      I am experiencing the same problem. Is there a resolution?

      1 Reply Last reply
      0
      • AndySA Offline
        AndySA Offline
        AndyS
        Moderators
        wrote on last edited by
        #3

        Seems to be a known problem still https://bugreports.qt.io/browse/QTBUG-54355 using QApplication instead of QGuiApplication works. And this may be better in the TableView for Qt Quick Controls 2 coming in 5.12.

        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        2
        • D Offline
          D Offline
          DBigler
          wrote on last edited by
          #4

          Thank you. That was the solution. When creating a default CMake project in Qt Creator it creates main using QGuiApplication instead of QApplication. Seems like the incorrect default if some of the Quick Controls 1 GUI elements, like TableView, rely on QWidgets.

          1 Reply Last reply
          0

          • Login

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