Results 1 to 14 of 14

Thread: Bring application window to front

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2010
    Location
    Ahmedabad,Gujarat,India
    Posts
    25
    Thanks
    14
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: Bring application window to front

    Try this it might be helps you.

    this->stackUnder(parentWidget()); [this means is your QMainWindow]

  2. #2
    Join Date
    Jul 2019
    Posts
    1
    Qt products
    Qt4 Qt5 PyQt3 PyQt4
    Platforms
    Unix/X11 Windows Android

    Default Re: Bring application window to front

    Quote Originally Posted by pavanbarot View Post
    Try this it might be helps you.

    this->stackUnder(parentWidget()); [this means is your QMainWindow]
    I used the following code to make a PyQt4 window the topmost window and to bring it to the front (in front of all other windows) in a Windows 10 64 bit environment:

    self.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint )

    # The following is drawn from: https://stackoverflow.com/questions/...p-to-the-front
    # the following will remove minimized status
    # and restore window with keeping maximized/normal state
    self.setWindowState(self.windowState() & ~QtCore.Qt.WindowMinimized | QtCore.Qt.WindowActive)

    # this will activate the window
    self.activateWindow()

Similar Threads

  1. Replies: 11
    Last Post: 15th July 2008, 13:11
  2. Qt3 Bring to front application
    By nleverin in forum Qt Programming
    Replies: 1
    Last Post: 7th February 2008, 11:27
  3. Independant window in an application
    By titoo in forum Qt Programming
    Replies: 4
    Last Post: 28th February 2007, 11:07
  4. move parent window to the front.
    By hvengel in forum Qt Programming
    Replies: 4
    Last Post: 2nd February 2007, 08:41
  5. Replies: 0
    Last Post: 21st February 2006, 16:30

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.