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. How to set a stePagestep of a QScrollBar on qt style sheet?
Forum Updated to NodeBB v4.3 + New Features

How to set a stePagestep of a QScrollBar on qt style sheet?

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 1.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.
  • slimhsS Offline
    slimhsS Offline
    slimhs
    wrote on last edited by
    #1

    I have so many sentences on a scrollArea and I want when I clicked a scrollBar I move from one sentence to onther and the old one is skipped from the list:

    QFrame{
    	border:solid;
    }
    
    QScrollBar:vertical {
    width: 15px;
    margin:30px 30px 30px 30px;
    border-style: solid;
    
    }
    
    QScrollBar::handle:vertical {
    
    min-height: 30px;
    border: solid ;
    
    }
    
    QScrollBar::add-line:vertical {
    subcontrol-position: bottom;
    subcontrol-origin: margin;
    border: solid ;
    height: 30px;
    }
    
    QScrollBar::sub-line:vertical {
    subcontrol-position: up;
    subcontrol-origin: margin;
    border: solid ;
    height: 30px;
    }
    
    QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
    background: none;
    }
    
    QScrollBar::up-arrow:vertical
    {
    image: url(image/up-arrow.png);
    }
    
    QScrollBar::down-arrow:vertical
    {
    image: url(image/down-arrow.png);
    }
    

    How to add a setPagestep on Qt stylesheet?

    raven-worxR 1 Reply Last reply
    0
    • slimhsS slimhs

      I have so many sentences on a scrollArea and I want when I clicked a scrollBar I move from one sentence to onther and the old one is skipped from the list:

      QFrame{
      	border:solid;
      }
      
      QScrollBar:vertical {
      width: 15px;
      margin:30px 30px 30px 30px;
      border-style: solid;
      
      }
      
      QScrollBar::handle:vertical {
      
      min-height: 30px;
      border: solid ;
      
      }
      
      QScrollBar::add-line:vertical {
      subcontrol-position: bottom;
      subcontrol-origin: margin;
      border: solid ;
      height: 30px;
      }
      
      QScrollBar::sub-line:vertical {
      subcontrol-position: up;
      subcontrol-origin: margin;
      border: solid ;
      height: 30px;
      }
      
      QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
      background: none;
      }
      
      QScrollBar::up-arrow:vertical
      {
      image: url(image/up-arrow.png);
      }
      
      QScrollBar::down-arrow:vertical
      {
      image: url(image/down-arrow.png);
      }
      

      How to add a setPagestep on Qt stylesheet?

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by raven-worx
      #2

      @slimhs said in How to set a stePagestep of a QScrollBar on qt style sheet?:

      How to add a setPagestep on Qt stylesheet?

      QScrollBar {
          qproperty-pageStep: 10;
      }
      

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • slimhsS Offline
        slimhsS Offline
        slimhs
        wrote on last edited by slimhs
        #3

        @raven-worx :Not worked :/

        raven-worxR 1 Reply Last reply
        0
        • slimhsS Offline
          slimhsS Offline
          slimhs
          wrote on last edited by
          #4

          ui->scrollArea->verticalScrollbar()->setSingleStep(10);

          1 Reply Last reply
          0
          • slimhsS slimhs

            @raven-worx :Not worked :/

            raven-worxR Offline
            raven-worxR Offline
            raven-worx
            Moderators
            wrote on last edited by
            #5

            @slimhs said in How to set a stePagestep of a QScrollBar on qt style sheet?:

            @raven-worx :Not worked :/

            can you be more specific?!

            @slimhs said in How to set a stePagestep of a QScrollBar on qt style sheet?:

            ui->scrollArea->verticalScrollbar()->setSingleStep(10);

            in your first post you were talking about setPagestep

            --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
            If you have a question please use the forum so others can benefit from the solution in the future

            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