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

change color and position scrollview in tableview

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
tableviewscrollview
8 Posts 2 Posters 3.2k 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.
  • M Offline
    M Offline
    MrErfan
    wrote on 6 Feb 2016, 21:10 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 6 Feb 2016, 21:22 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.

      M 1 Reply Last reply 7 Feb 2016, 07:48
      0
      • J johnsmith
        6 Feb 2016, 21:22

        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.

        M Offline
        M Offline
        MrErfan
        wrote on 7 Feb 2016, 07:48 last edited by
        #3

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

        J 1 Reply Last reply 7 Feb 2016, 09:07
        0
        • M Offline
          M Offline
          MrErfan
          wrote on 7 Feb 2016, 08:57 last edited by
          #4

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

          1 Reply Last reply
          0
          • M MrErfan
            7 Feb 2016, 07:48

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

            J Offline
            J Offline
            johnsmith
            wrote on 7 Feb 2016, 09:07 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
            • M Offline
              M Offline
              MrErfan
              wrote on 7 Feb 2016, 09:56 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 7 Feb 2016, 10:07
              0
              • M MrErfan
                7 Feb 2016, 09:56

                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 7 Feb 2016, 10:07 last edited by
                #7

                @MrErfan Customizing a QScrollBar

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  MrErfan
                  wrote on 7 Feb 2016, 10:10 last edited by
                  #8

                  I like it when you do QtQuick !

                  1 Reply Last reply
                  0

                  3/8

                  7 Feb 2016, 07:48

                  topic:navigator.unread, 5
                  • Login

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