Results 1 to 2 of 2

Thread: Change key focus

  1. #1
    Join Date
    Jan 2011
    Posts
    212
    Thanks
    24
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Change key focus

    Hello forum,

    In an application window there are many items and i believe there is some way to explicitly put focus on some of the items. I want to pit focus on the qgraphicsview widget when the window is loaded for the first time. How do i do this?

    Lets take the Diagram Scene example . When is the window is first loaded the font combo box gets the initial focus and i want to change this so that the focus is set to something else when the window is first loaded


    Regards
    Sajjad

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: Change key focus

    Qt Code:
    1. QWidget::setFocus()
    To copy to clipboard, switch view to plain text mode 
    Documentation

Similar Threads

  1. Change focus problem
    By ram4soft in forum Newbie
    Replies: 2
    Last Post: 30th March 2011, 09:45
  2. crash on focus change from child
    By ebutz in forum Newbie
    Replies: 0
    Last Post: 8th April 2009, 16:43
  3. Change focus on QToolBox
    By mattia in forum Newbie
    Replies: 1
    Last Post: 20th December 2007, 08:56
  4. Replies: 15
    Last Post: 26th July 2007, 21:04

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.