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. Check scroll being scrolled

Check scroll being scrolled

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 1.0k 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.
  • S Offline
    S Offline
    SherifOmran
    wrote on last edited by
    #1

    hello guys,

    i have a qtextbrowser in my app and i want to check if the scroll is scrolled down to the end of the page. Something similar to agreement reading.

    Could somebody please point me to the right direction, how to do it.

    thanks

    1 Reply Last reply
    0
    • raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      You an do the following:
      @
      connect(myTextBrowser->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(onVerticalScrollBarValueChanged()));
      ....
      void MyTextBrowser::onVerticalScrollBarValueChanged()
      {
      if( myTextBrowser->verticalScrollBar()->value() == myTextBrowser->horizontalScrollBar()->maximum() )
      {
      .... //do your stuff here
      }
      }
      @

      --- 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
      • B Offline
        B Offline
        b1gsnak3
        wrote on last edited by
        #3

        the slot must have an int parameter for example:

        @
        void MyTextBrowser::onVerticalScrollBarValueChanged(int a) {
        if(myTB->verticalScrollBar()->maximum() == a) { //bla bla }

        }

        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