Results 1 to 5 of 5

Thread: MDI subWindow activating when switching toolbox page

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2010
    Posts
    18
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default MDI subWindow activating when switching toolbox page

    Hi everybody!

    I have a weird bug in my program and I can't find what is causing it. My program is an MDI program with toolbox, which I have subclassed from QToolbox.

    The steps to reproduce the bug are as follows:

    1) I open two sub windows and make sure the second sub window is the active window.

    2) I then click on a page area (or a control on a page) in the toolbox, therefore activating it presumably.

    3) I click on a different page heading in the toolbox to switch pages. When I do this the first sub window becomes active. This shouldn't happen, switching pages in the toolbox should not affect which sub window is active.

    Has anybody else experienced this problem? I pretty sure it is my mistake somewhere, but I just can't find it - but maybe it is a Qt bug (unlikely)?

    I'm not using the QToolbox currentChanged signal, so I do not understand how switching a page in the toolbox can affect the sub windows? Maybe I will have to create a dummy MDI application with toolbox to see if the bug occurs with that.

    Any ideas greatly appreciated. Thanks!

    zenzero-2001

  2. #2
    Join Date
    May 2010
    Posts
    86
    Thanks
    17
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: MDI subWindow activating when switching toolbox page

    Is it always the frist MDI window which is activated? Have you tried to open more than two?
    If it was a bug of Qt, I would store the index of active window and would activate it back later. I know, it is just a workaround.

  3. #3
    Join Date
    Apr 2010
    Posts
    18
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: MDI subWindow activating when switching toolbox page

    It is always the window that was created earliest that is activated.

    Yes, I could do that - it is a hack though.

Similar Threads

  1. Change Title of toolbox's page. How?
    By hakermania in forum Newbie
    Replies: 10
    Last Post: 27th November 2016, 01:26
  2. Activating Console in VS2008 Qt Integration Gui App
    By sepp in forum Qt Programming
    Replies: 6
    Last Post: 5th December 2010, 13:51
  3. How to implement page switching?
    By kellen851105 in forum Qt Programming
    Replies: 1
    Last Post: 24th February 2010, 05:35
  4. selecting/activating tabify'd DockWidget?
    By iraytrace in forum Qt Programming
    Replies: 2
    Last Post: 19th February 2010, 18:44
  5. Activating multiple windows
    By lixo1 in forum Qt Programming
    Replies: 2
    Last Post: 12th May 2009, 20:54

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
  •  
Qt is a trademark of The Qt Company.