Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. tableviewcolumn
    Log in to post

    • SOLVED how to get the current index on click of an image for table view
      QML and Qt Quick • qml qt5 tableviewcolumn table view • • vinaygopal  

      2
      0
      Votes
      2
      Posts
      117
      Views

      @vinaygopal according to the documentation: https://doc.qt.io/qt-5/qml-qtquick-controls-tableviewcolumn.html#delegate-prop this should do the trick: Component{ id:firstColumnComponent Item { id: toplevelItem property bool textpresent: true Row{ spacing: 10 TextField{ id:te width: 100 text: styleData.value maximumLength: 20 onAccepted:{ console.log("the editing is finished to",te.text) peopleTable.editfinished(te.text,styleData.value) } } Image { id: fav_image source: "qrc:/favourite_icon.png" height: 20 width: 40 MouseArea{ anchors.fill: parent onClicked: { console.log("the current index is",styleData.row) //Change happened here } } } } } }
    • SOLVED how to apply certain properties only to the selected delegates
      QML and Qt Quick • qml qt5 delegate tableviewcolumn table view • • vinaygopal  

      3
      0
      Votes
      3
      Posts
      120
      Views

      @fcarney Got it thank you so much :)
    • SOLVED how to access data from a delegate's component.
      QML and Qt Quick • qml tableview delegate qt5.15.2 tableviewcolumn • • vinaygopal  

      4
      0
      Votes
      4
      Posts
      132
      Views

      The model should provide this information for you. Create a role in the model which will return the correct value for any given cell. On QML side, just access that role and display it directly. No need for any get() method (which, by the way, is called data() https://doc.qt.io/qt-5/qabstractitemmodel.html#data, not get()).
    • UNSOLVED Is it possible through qml javascript change the value of an delegate of a TableViewColumn?
      QML and Qt Quick • qml tableview model tableviewcolumn • • Nmaster88  

      1
      0
      Votes
      1
      Posts
      207
      Views

      No one has replied

    • UNSOLVED Is there a way to have subheader on a TableView?
      QML and Qt Quick • tableview tableviewcolumn • • Nmaster88  

      1
      0
      Votes
      1
      Posts
      218
      Views

      No one has replied

    • UNSOLVED How I can create the table view having two columns in QML?
      QML and Qt Quick • qml pyqt5 python3 tableviewcolumn • • Rohn  

      2
      0
      Votes
      2
      Posts
      852
      Views

      Hi there. I think you can use TableViewColumn element to create a new column inside a TableView component. If necessary, you can define your own delegate to set how the data is showed to user. Read more: http://doc.qt.io/qt-5/qml-qtquick-controls-tableview.html#details <- TableView Documentation http://doc.qt.io/qt-5/qtquickcontrols-tableview-main-qml.html <- TableView Example
    • UNSOLVED qml TableView and group of columns
      QML and Qt Quick • tableview tableviewcolumn • • BePie  

      1
      0
      Votes
      1
      Posts
      440
      Views

      No one has replied

    • SOLVED Sorting QTableview items alphabetically!
      General and Desktop • tableviewcolumn sort items alphabetical • • Kushan  

      6
      0
      Votes
      6
      Posts
      3170
      Views

      @VRonin Thanx mate
    • UNSOLVED TableView and Columns
      QML and Qt Quick • tableview tableviewcolumn • • RostV  

      1
      0
      Votes
      1
      Posts
      441
      Views

      No one has replied

    • UNSOLVED How to use resizeToContents() in a TableView?
      QML and Qt Quick • tableviewcolumn • • Sikarjan  

      5
      0
      Votes
      5
      Posts
      3350
      Views

      Thanks again for helping. But it is not really working for me. My model is a XmlListModel and I tried your code with status == ready and onComplete but nothing. When I add a button and connect the function to onClicked your code works nicely... Unfortunately the length of the table header is not considered. I believe this is a two year old bug. At the moment I am using width: title.length*factor This seems to work okay for now. I am just curious if it will work on other screens as well.
    • UNSOLVED TableViewColumn, ListModel, ... not displayed in the section "Navigator" of Qt Quick Designer
      QML and Qt Quick • qt quick tableviewcolumn display navigator • • Okyn  

      1
      0
      Votes
      1
      Posts
      507
      Views

      No one has replied

    • UNSOLVED How do I emit signal while clicking TableViewColumn?
      QML and Qt Quick • delegate mousearea tableviewcolumn • • Mira13  

      1
      0
      Votes
      1
      Posts
      598
      Views

      No one has replied