Results 1 to 5 of 5

Thread: ScrollArea:AutoScroll to setfocus'ed control

  1. #1
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Thanks
    37
    Thanked 47 Times in 43 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default ScrollArea:AutoScroll to setfocus'ed control

    hi,
    im using QScrollArea in a fixed region to scroll.
    The Fixed window size : 320 x 240
    There are totally 30 LineEdits are placed in this window.
    (say 10 LineEdits are visible ,without scrolling)
    At the bottom im having a button.
    when the button was clicked , 14th LineEdit will be focused using the setfocus

    My Question is how to auto scroll to the LineEdit which got focused (in mycase it is 14th LineEdit?

    how to autoscroll to the focused control?

    Thanks
    Bala
    Last edited by BalaQT; 21st October 2009 at 16:51.

  2. #2
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Thanks
    37
    Thanked 47 Times in 43 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Question Re: ScrollArea:AutoScroll to setfocus'ed control

    Can i set value for vertical scroll bar in QScrollArea?

    Thnks
    Bala

  3. #3
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Thanks
    37
    Thanked 47 Times in 43 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: ScrollArea:AutoScroll to setfocus'ed control

    how to use ensurevisible() for my problem?

    Bala

  4. #4
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Thanks
    37
    Thanked 47 Times in 43 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: ScrollArea:AutoScroll to setfocus'ed control

    any solutions??

    Bala

  5. #5
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Thanks
    37
    Thanked 47 Times in 43 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Thumbs up Re: ScrollArea:AutoScroll to setfocus'ed control

    ensureWidgetVisible solved my problem

    Thnks to wysota for his great support

Similar Threads

  1. Replies: 3
    Last Post: 7th October 2015, 20:43
  2. Text shifts when control appears...
    By MrGarbage in forum Qt Programming
    Replies: 4
    Last Post: 18th January 2008, 04:12
  3. How can i import a User Control Class .DLL
    By mmg123 in forum Qt Tools
    Replies: 2
    Last Post: 6th October 2006, 02:27
  4. QTextEdit control
    By vijay anandh in forum Qt Programming
    Replies: 2
    Last Post: 31st May 2006, 14:14
  5. Replies: 6
    Last Post: 3rd February 2006, 10:48

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.