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 CONNECT SCROLL BAR TO WIDGET
Forum Updated to NodeBB v4.3 + New Features

HOW TO CONNECT SCROLL BAR TO WIDGET

Scheduled Pinned Locked Moved Solved General and Desktop
scroll barwidget resizeqt5.4m4rzb4nitechnology
8 Posts 2 Posters 6.9k Views 1 Watching
  • 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.
  • M4RZB4NiM Offline
    M4RZB4NiM Offline
    M4RZB4Ni
    wrote on last edited by
    #1

    HI,
    I Want to Know How i Can use a Scroll Bar to Scroll My Widget ?
    if i Want To Scroll in a Tab Widget what i Must Do?

    Thanks
    M4RZB4Ni

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      There is a widget call
      QScrollArea
      Place that first and put what ever u
      want to scroll around inside that area.

      M4RZB4NiM 1 Reply Last reply
      1
      • mrjjM mrjj

        Hi
        There is a widget call
        QScrollArea
        Place that first and put what ever u
        want to scroll around inside that area.

        M4RZB4NiM Offline
        M4RZB4NiM Offline
        M4RZB4Ni
        wrote on last edited by
        #3

        @mrjj
        TNX
        BUT I WANT USE A verticalScrollBar
        NO SCROLL AREA!

        Thanks
        M4RZB4Ni

        1 Reply Last reply
        0
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Why the caps ??

          There is also a scrollbar widget you can add
          It will emit signals when scrolled and you can hook up your
          widget to this signal and do what u need to do.

          M4RZB4NiM 1 Reply Last reply
          1
          • mrjjM mrjj

            Why the caps ??

            There is also a scrollbar widget you can add
            It will emit signals when scrolled and you can hook up your
            widget to this signal and do what u need to do.

            M4RZB4NiM Offline
            M4RZB4NiM Offline
            M4RZB4Ni
            wrote on last edited by
            #5

            @mrjj
            can you Write a simple code for me when i changed the verticalScrollBar value
            my tab widget changed?
            tnx so much

            Thanks
            M4RZB4Ni

            1 Reply Last reply
            0
            • mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Your tabwidget ?
              What should it do?
              It cannot scroll as such. It could display the value in a label or
              something like that but otherwise I have no idea what u expect it should do ?

              M4RZB4NiM 1 Reply Last reply
              1
              • mrjjM mrjj

                Your tabwidget ?
                What should it do?
                It cannot scroll as such. It could display the value in a label or
                something like that but otherwise I have no idea what u expect it should do ?

                M4RZB4NiM Offline
                M4RZB4NiM Offline
                M4RZB4Ni
                wrote on last edited by
                #7

                @mrjj
                what is the code of connect a verticalScrollBar to widget to scrolling?
                tnx

                Thanks
                M4RZB4Ni

                mrjjM 1 Reply Last reply
                0
                • M4RZB4NiM M4RZB4Ni

                  @mrjj
                  what is the code of connect a verticalScrollBar to widget to scrolling?
                  tnx

                  mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @M4RZB4Ni
                  Hi its all in here
                  http://doc.qt.io/qt-5/qscrollbar.html#details
                  But connecting to a random widget will do nothing.

                  IF u have this case,
                  user click on Tab
                  In tab there are many widget so he need to scroll to see last of them, then u just use
                  a scroll area and put all stuff inside. then it will just work. ScrollArea have scrollbars.
                  U can control if both horz and vert or just horz.

                  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