Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Forcing a popup window to always be in front of fullscreen
Qt 6.11 is out! See what's new in the release blog

Forcing a popup window to always be in front of fullscreen

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 1.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    P1llus
    wrote on last edited by
    #1

    Hello!

    We have a application that is running in borderless fullscreen. During certain events, we are required to have a popup window appear in front.

    When the popup window is called:

    save_data_list_dialog::save_data_list_dialog(const std::vector<SaveDataEntry>& entries, s32 focusedEntry, bool is_saving, QWidget* parent)
    	: QDialog(parent), m_save_entries(entries), m_entry(-1), m_entry_label(nullptr)
    

    The window appears sometimes in front, but not always, and especially for Nvidia users. What would be the best approach to force a window to always pop up in front of everything else, even it's own parent if needed?

    JonBJ 1 Reply Last reply
    0
    • P P1llus

      Hello!

      We have a application that is running in borderless fullscreen. During certain events, we are required to have a popup window appear in front.

      When the popup window is called:

      save_data_list_dialog::save_data_list_dialog(const std::vector<SaveDataEntry>& entries, s32 focusedEntry, bool is_saving, QWidget* parent)
      	: QDialog(parent), m_save_entries(entries), m_entry(-1), m_entry_label(nullptr)
      

      The window appears sometimes in front, but not always, and especially for Nvidia users. What would be the best approach to force a window to always pop up in front of everything else, even it's own parent if needed?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @P1llus
      Have you tried setWindowFlags(Qt::WindowStaysOnTopHint); and/or setWindowModality Qt::WindowModal/Qt::ApplicationModal?

      Though if behaviour is varying by gfx card it sounds like some other issue....

      1 Reply Last reply
      0
      • P Offline
        P Offline
        P1llus
        wrote on last edited by
        #3

        That did the trick :) thank you

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved