Results 1 to 2 of 2

Thread: QMdiArea, doesn't bring QWidget childs to front when clicking on them

  1. #1
    Join Date
    Jan 2012
    Posts
    15
    Thanks
    4
    Qt products
    Qt4

    Default QMdiArea, doesn't bring QWidget childs to front when clicking on them

    Hi i'm having some problems with the QMdiArea. The Problem is that when i add child widgets to the mdi area the newest added child stays allways on top and i cannot switch to a child which was added before. Well actually i can switch by clicking on the older child but the older child widget is not moved to the front (i can see that a lineedit in the older child gets the blinking cursor so it gets the focus but the widget stays behind the mdi childs which where added later to the mdi area). However if i use a double click on the mdi child window title bar it works, it is brought to front and maximized. Am i missing something? Do i need call some kind of bringtofront() function when receiving a click ?

  2. #2
    Join Date
    Jan 2012
    Posts
    15
    Thanks
    4
    Qt products
    Qt4

    Default Re: QMdiArea, doesn't bring QWidget childs to front when clicking on them

    I "fixed" it with:
    void MyCustomView::mousePressEvent ( QMouseEvent * e ){
    ((QWidget*)parent())->raise();
    }

    but should this not happen automaticaly in a mdi area when clicking on child views?

Similar Threads

  1. Replies: 2
    Last Post: 29th May 2011, 14:58
  2. Bring window to the front
    By Barry79 in forum Newbie
    Replies: 2
    Last Post: 14th August 2009, 18:50
  3. Bring QDialog to front
    By mitro in forum Newbie
    Replies: 3
    Last Post: 21st April 2008, 21:32
  4. Qt3 Bring to front application
    By nleverin in forum Qt Programming
    Replies: 1
    Last Post: 7th February 2008, 12:27
  5. How to bring a dialogbox to the front?
    By bood in forum Qt Programming
    Replies: 2
    Last Post: 2nd August 2006, 16: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.