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.7k 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.
  • M Offline
    M Offline
    M4RZB4Ni
    wrote on 22 Apr 2016, 08:44 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
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 22 Apr 2016, 08:48 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.

      M 1 Reply Last reply 22 Apr 2016, 08:58
      1
      • M mrjj
        22 Apr 2016, 08:48

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

        M Offline
        M Offline
        M4RZB4Ni
        wrote on 22 Apr 2016, 08:58 last edited by
        #3

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

        Thanks
        M4RZB4Ni

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 22 Apr 2016, 09:01 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.

          M 1 Reply Last reply 22 Apr 2016, 09:04
          1
          • M mrjj
            22 Apr 2016, 09:01

            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.

            M Offline
            M Offline
            M4RZB4Ni
            wrote on 22 Apr 2016, 09:04 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
            • M Offline
              M Offline
              mrjj
              Lifetime Qt Champion
              wrote on 22 Apr 2016, 09:06 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 ?

              M 1 Reply Last reply 22 Apr 2016, 09:15
              1
              • M mrjj
                22 Apr 2016, 09:06

                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 ?

                M Offline
                M Offline
                M4RZB4Ni
                wrote on 22 Apr 2016, 09:15 last edited by
                #7

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

                Thanks
                M4RZB4Ni

                M 1 Reply Last reply 22 Apr 2016, 09:31
                0
                • M M4RZB4Ni
                  22 Apr 2016, 09:15

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

                  M Offline
                  M Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on 22 Apr 2016, 09:31 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

                  8/8

                  22 Apr 2016, 09:31

                  • Login

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