Results 1 to 3 of 3

Thread: Activating multiple windows

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2008
    Posts
    60
    Thanks
    20
    Thanked 3 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Activating multiple windows

    Hello,

    My application has 2 QMainWindow, the first window opens the second usign show().
    The problem is: when the 2nd window opens the first is hidden by it, and I cannot change the active control to the first when I click on it. This problem occurs only on Microsoft Windows, and you can reproduce it with the example/widget/windowflags.
    Is there a QFlag option or something to allow this permutation between the 2 windows?

    Thank you very much.
    Last edited by lixo1; 12th May 2009 at 19:00.

  2. #2
    Join Date
    Dec 2006
    Posts
    849
    Thanks
    6
    Thanked 163 Times in 151 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Activating multiple windows

    I don't use windows but maybe this helps
    * make sure you don't call setModal() or something like that
    * maybe (give it a try) do not pass one window as the other's parent
    * maybe some window flags like Qt::Window (should be set by default) help

    HTH

  3. #3
    Join Date
    Sep 2008
    Posts
    60
    Thanks
    20
    Thanked 3 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Activating multiple windows

    Hi Caduel,

    Thank you for your help, but unfortunately I don't use setModal(), I don't pass one window as the other's parent and I tried Qt::Window, but nothing.

    So If I can reformulate the problem, I have 2 QMainWindow, the first launch the second (using show()) and then the first window remains in the 2nd plan (background), I cannot deplace it to the first plan when I click with the mouse.
    I can use the first window but it's very incovenient because I cannot put it in the first plan.
    I constated this problem only on Windows, because the same application on Linux and Mac works perfectly.
    In easy words the first window is always behind the other, prevented its visualization.

    Thank you very much for any kind of help.

Similar Threads

  1. how to create multiple windows in QT
    By durgarao in forum Qt Tools
    Replies: 1
    Last Post: 9th January 2009, 14:47
  2. Multiple versions of Qt in Windows?
    By gfunk in forum Qt Programming
    Replies: 1
    Last Post: 27th August 2007, 19:07
  3. Multiple Windows -> Advice needed
    By vokal in forum Newbie
    Replies: 2
    Last Post: 8th January 2007, 08:40
  4. QGLWidget and multiple windows
    By ToddAtWSU in forum Qt Programming
    Replies: 1
    Last Post: 21st November 2006, 13:38

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.