Results 1 to 9 of 9

Thread: Dock widgets PROBLEM

  1. #1
    Join Date
    Mar 2006
    Posts
    4
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Dock widgets PROBLEM

    Hi,

    I use QT 4.1.1 and I noticed a huge problem that might put the project I'm working on hold! A floating dockwidget deactivates then mainwindow and viceversa. This is a stupid flaw and for now I couldn't find any workaround this other than throwing QT out.

    Any suggestions will be greatly appreciated!

    Thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Ukraine,Lviv
    Posts
    454
    Thanks
    9
    Thanked 27 Times in 27 Posts
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: Dock widgets PROBLEM

    Acytual piece of code will be helpful for find solution
    a life without programming is like an empty bottle

  3. #3
    Join Date
    Mar 2006
    Posts
    4
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Dock widgets PROBLEM

    Just open the QDesigner, make a dock widget floatable and you will see the problem. Once you click the dock widget the main window is inactive! How can you make the application inactive while working in one of its own windows?!?

  4. #4
    Join Date
    Jan 2006
    Location
    Ukraine,Lviv
    Posts
    454
    Thanks
    9
    Thanked 27 Times in 27 Posts
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: Dock widgets PROBLEM

    Hmm...and after run ap you see the same problem?
    a life without programming is like an empty bottle

  5. #5
    Join Date
    Mar 2006
    Posts
    4
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Dock widgets PROBLEM

    it's the designer itself, or any mainwindow based qt application. They all suffer from this: the mainwindow and the floating dock widget deactivate one another. I'm afraid there is no simple workaround for this as it seems that on windows you have to use the mfc SDI/MDI framework to add floating tool windows that stay activated as laong as the application is activated and also do not deactivate the main window once they get focus.
    Nasty ...

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Dock widgets PROBLEM

    Quote Originally Posted by L1L0
    I'm afraid there is no simple workaround for this
    What did you try so far? Window is activated when it gets focus, try preventing it.

  7. #7
    Join Date
    Mar 2006
    Posts
    4
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Dock widgets PROBLEM

    But how can you type text without focus?

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Dock widgets PROBLEM

    Quote Originally Posted by L1L0
    But how can you type text without focus?
    I don't get it. You want it to receive keyboard focus, but you don't want it to become active (i.e. to receive the keyboard focus)?

  9. #9
    Join Date
    Jan 2006
    Location
    Mountain View, CA
    Posts
    279
    Thanked 42 Times in 37 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Dock widgets PROBLEM

    Quote Originally Posted by L1L0
    Just open the QDesigner, make a dock widget floatable and you will see the problem. Once you click the dock widget the main window is inactive! How can you make the application inactive while working in one of its own windows?!?
    This is supposed to happen. Once floated, the window is a speparate entitiy. MS Visual Studio behaves exactly the same. There is no flaw in Qt here.

    If you really want this bizarre behaviour, just call activateWindow() on the main window after the dock window is floated.
    Save yourself some pain. Learn C++ before learning Qt.

Similar Threads

  1. QDockWidget/Central Widget Problem
    By Lemming in forum Qt Programming
    Replies: 7
    Last Post: 3rd April 2016, 09:52
  2. Mac OS X Top-Level Transparent Widgets
    By tinsuke in forum Qt Programming
    Replies: 0
    Last Post: 17th October 2008, 16:01
  3. Replies: 2
    Last Post: 16th May 2008, 14:39
  4. Applying size constraints to dock widgets
    By fullmetalcoder in forum Qt Programming
    Replies: 4
    Last Post: 23rd October 2007, 13:22
  5. Replies: 11
    Last Post: 7th July 2006, 13:09

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.