Results 1 to 2 of 2

Thread: Focus issues / Setting multiple focus

  1. #1
    Join Date
    Feb 2007
    Posts
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Focus issues / Setting multiple focus

    Hi all,

    This is my first post here, although I am a longtime Qt user. Anyway, I am looking to do two things: one, to have tool windows always have the focus (or always be drawn as if they have the focus), and to have both my main window and its sub-dialogs to share focus, ala Photoshop. On Windows, I want to have an MDI-style setup, although I am not using the Qt MDI classes. I would like all keyboard events to propagate from my dialogs (which display images) to the main window, which just has the menubar. On the mac, I want to have just a menubar and tool windows. Basically, I want to emulate the behavior of Photoshop.

    I tried using setFocusProxy, but all the combinations of calls I made seemed to have no effect, I suspect I don't really understand the function.

    Any help would be appriciated,

    cp

  2. #2
    Join Date
    May 2006
    Location
    Bangalore,India
    Posts
    235
    Thanks
    7
    Thanked 25 Times in 24 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Focus issues / Setting multiple focus

    calling raise() will set the focus on widget.

    You will have check the geometry(). If the geometry's x
    and y coordinates are negative, the widget is not on focus.
    If the coordinates are positive, the widget is on top .

    I have implemneted these method on QDockWidget. it may help you.

Similar Threads

  1. Setting focus on Canvas
    By Kapil in forum Qt Programming
    Replies: 10
    Last Post: 17th May 2006, 12:55

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.