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. How to scroll down using button when default scroll bar is disabled?
Forum Updated to NodeBB v4.3 + New Features

How to scroll down using button when default scroll bar is disabled?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 348 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.
  • J Offline
    J Offline
    JasmineSethi
    wrote on last edited by JasmineSethi
    #1

    0_1548676652116_3abcda91-4034-46e3-84fa-f7cbf97ef9c5-image.png

    I want to scroll down on clicking these 2 up-down buttons. How this can be achieved?
    Code looks like this:

    main.qml

    ListModel
    {
    id: dataModel
    ListElement{ name: "Sun" }
    ListElement{ name: "Mon" }
    ListElement{ name: "Tue" }
    ListElement{ name: "Wed" }
    ListElement{ name: "Thurs" }
    ListElement{ name: "Fri" }
    ListElement{ name: "Sat" }
    ListElement{ name: "Sun" }
    }
    //For drop down menu
    Button{
    id: comboBox
    ...
    }

    TableView
    {
    id: tableView
    ...
    }
    //For up button
    Image
    {
    id: img1
    }
    //For down button
    Image
    {
    id: img2
    }

    J.HilkJ 1 Reply Last reply
    0
    • J JasmineSethi

      0_1548676652116_3abcda91-4034-46e3-84fa-f7cbf97ef9c5-image.png

      I want to scroll down on clicking these 2 up-down buttons. How this can be achieved?
      Code looks like this:

      main.qml

      ListModel
      {
      id: dataModel
      ListElement{ name: "Sun" }
      ListElement{ name: "Mon" }
      ListElement{ name: "Tue" }
      ListElement{ name: "Wed" }
      ListElement{ name: "Thurs" }
      ListElement{ name: "Fri" }
      ListElement{ name: "Sat" }
      ListElement{ name: "Sun" }
      }
      //For drop down menu
      Button{
      id: comboBox
      ...
      }

      TableView
      {
      id: tableView
      ...
      }
      //For up button
      Image
      {
      id: img1
      }
      //For down button
      Image
      {
      id: img2
      }

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      @JasmineSethi

      Connect to the clicked signals and change the currentIndex property of your ListView


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      2

      • Login

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