Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved How I can create the table view having two columns in QML?

    QML and Qt Quick
    python3 qml pyqt5 tableviewcolumn
    2
    2
    1100
    Loading More Posts
    • 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.
    • R
      Rohn last edited by

      I want to create a auto scrolling table view with two columns in single row QML. In every row I want to read two lines from Python file in two columns of that row respectively. I want to read two lines every time while iterating through file from python file and update them to two columns from each row under table view . So how I can do this operation. Please let me know how I can do it dynamically in PyQt5 and QML interaction and creating the good looking table view

      1 Reply Last reply Reply Quote 0
      • KillerSmath
        KillerSmath last edited by

        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

        @Computer Science Student - Brazil
        Web Developer and Researcher
        “Sometimes it’s the people no one imagines anything of who do the things that no one can imagine.” - Alan Turing

        1 Reply Last reply Reply Quote 0
        • First post
          Last post