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. Scroll area does not come back up

Scroll area does not come back up

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 373 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.
  • Alexandre CameloA Offline
    Alexandre CameloA Offline
    Alexandre Camelo
    wrote on last edited by
    #1

    I created a form that has many fields and so I needed to put them in a scroll area.

    When the code focuses on the fields at the bottom of the scroll area, the scroll bar will drop down to the area where the field is (this is normal). However, when the code plays the first focus field from the top, the scroll bar does not come back up.

    That is, the first field has focus, but I can't see it because the scrollbar is still at the bottom of the scroll area.

    I tried to find some information in the QT documentation. I tried some commands (I don't remember which ones), but they didn't work. @mrjj

    Can someone help me please?

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

      Hi,

      One way would be to use an event filter and on the focus in event call ensureWidgetVisible on with the concerned widget.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      Alexandre CameloA 2 Replies Last reply
      0
      • SGaistS SGaist

        Hi,

        One way would be to use an event filter and on the focus in event call ensureWidgetVisible on with the concerned widget.

        Alexandre CameloA Offline
        Alexandre CameloA Offline
        Alexandre Camelo
        wrote on last edited by
        #3

        @SGaist Hi!

        I didn't quite understand what you said.

        However, I believe the problem is not in the events.

        I need a command that makes the scroll area move up or down.

        Does this command exist?

        1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          One way would be to use an event filter and on the focus in event call ensureWidgetVisible on with the concerned widget.

          Alexandre CameloA Offline
          Alexandre CameloA Offline
          Alexandre Camelo
          wrote on last edited by
          #4

          @SGaist Correcting:

          I need a command that moves the inside of the scroll area so that through the code I can make the fields go up or down.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            That's the idea when using ensureWidgetVisible.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            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