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. change color and position scrollview in tableview
Forum Updated to NodeBB v4.3 + New Features

change color and position scrollview in tableview

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
tableviewscrollview
8 Posts 2 Posters 3.3k Views
  • 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.
  • MrErfanM Offline
    MrErfanM Offline
    MrErfan
    wrote on last edited by
    #1

    Hi guys good time
    I want to change the color , And I want to scroll to the left or right or up What should I do ?
    thanks

            TableView {
                id : tbl
                width: win.width
                height: win.height
                TableViewColumn {
                    role: "title"
                    title: "Title"
                    width: 100
                }
                TableViewColumn {
                    role: "author"
                    title: "Author"
                    width: 200
                }
                model: "1000"
            }
    
    1 Reply Last reply
    0
    • J Offline
      J Offline
      johnsmith
      wrote on last edited by
      #2

      For the color, you can customize the look by overriding the itemDelegate, rowDelegate, or headerDelegate properties, or you can create a custom appearance for a TableView by assigning a TableViewStyle. For the scrolling, if I'm not mistaken a TableView automatically adds scrollbars when required, so just make it small enough that the data won't fit in the viewable area, and you should get scrollbars.

      MrErfanM 1 Reply Last reply
      0
      • J johnsmith

        For the color, you can customize the look by overriding the itemDelegate, rowDelegate, or headerDelegate properties, or you can create a custom appearance for a TableView by assigning a TableViewStyle. For the scrolling, if I'm not mistaken a TableView automatically adds scrollbars when required, so just make it small enough that the data won't fit in the viewable area, and you should get scrollbars.

        MrErfanM Offline
        MrErfanM Offline
        MrErfan
        wrote on last edited by
        #3

        @johnsmith Thank you for your response
        Let's an example code?

        J 1 Reply Last reply
        0
        • MrErfanM Offline
          MrErfanM Offline
          MrErfan
          wrote on last edited by
          #4

          I very search, unfortunately could not find the custom scroll in tableview :(
          grateful for help

          1 Reply Last reply
          0
          • MrErfanM MrErfan

            @johnsmith Thank you for your response
            Let's an example code?

            J Offline
            J Offline
            johnsmith
            wrote on last edited by
            #5

            @MrErfan Regarding the issue with color, this is for a ListView, but the same principle should apply: https://wiki.qt.io/How_To_Use_QML_ListView

            As for the custom scroll, what is the exact problem? The scrollbars should appear if they're needed.

            1 Reply Last reply
            0
            • MrErfanM Offline
              MrErfanM Offline
              MrErfan
              wrote on last edited by
              #6

              I used my table, and I want to change the color and shape scroll ،
              Such as photos : LINK

              J 1 Reply Last reply
              0
              • MrErfanM MrErfan

                I used my table, and I want to change the color and shape scroll ،
                Such as photos : LINK

                J Offline
                J Offline
                johnsmith
                wrote on last edited by
                #7

                @MrErfan Customizing a QScrollBar

                1 Reply Last reply
                0
                • MrErfanM Offline
                  MrErfanM Offline
                  MrErfan
                  wrote on last edited by
                  #8

                  I like it when you do QtQuick !

                  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