Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QSlider Vertical - Start scrolling from Top
Qt 6.11 is out! See what's new in the release blog

QSlider Vertical - Start scrolling from Top

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 991 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.
  • dheerendraD Offline
    dheerendraD Offline
    dheerendra
    Moderators Qt Champions 2024 Qt Champions 2022 Qt Champions 2017
    wrote on last edited by dheerendra
    #1

    Hi

    Trying on ubuntu with Vertical QSlider. I would like to have QSlider to start scrolling from top. QSlider handle starts from bottom. How can we make the slider handle to start from top ?

    I'm displaying the data in QTableView. I would like to remove the scrollbar and add my own Qslider. This slider always starts from bottom irrespective of setmax, set position etc. I have already tried with following

     slider.setValue(100);
     slider.setMaximum(100);
     slider.setSliderPosition(100);
    

    All this works If I use the QSlider without TableView. If attach the slider as part of QTableView, slider handle is always in the bottom.

    Dheerendra
    @Community Service
    Certified Qt Specialist
    https://www.pthinks.com

    1 Reply Last reply
    0
    • Vinod KuntojiV Offline
      Vinod KuntojiV Offline
      Vinod Kuntoji
      wrote on last edited by
      #2

      @dheerendra ,

      Hi Sir,

      verticalSlider->setInvertedAppearance(true);

      It will make the slider handle to start from top.

      C++, Qt, Qt Quick Developer,
      PthinkS, Bangalore

      1 Reply Last reply
      3

      • Login

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