Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Check scroll being scrolled

    General and Desktop
    3
    3
    833
    Loading More Posts
    • 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
      SherifOmran last edited by

      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 Reply Quote 0
      • raven-worx
        raven-worx Moderators last edited by

        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 Reply Quote 0
        • B
          b1gsnak3 last edited by

          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 Reply Quote 0
          • First post
            Last post