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. Qt5 modal widget stuck behind main window on Linux(buster)

Qt5 modal widget stuck behind main window on Linux(buster)

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 219 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.
  • N Offline
    N Offline
    Nata1ie
    wrote on last edited by Nata1ie
    #1

    [Qt5 modal dialogs stuck behind main window](seems like its hanging)
    I already tried:
    warning = new QWidget(wdcentral);
    warning->setWindowModality(Qt::WindowModal);
    warning->setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);

    Note it works in prev version of Debian (strach + Qt5).

    I've found in forum 2014 the solution:
    warning->setWindowFlags(warning->windowFlags() | Qt::Window | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
    it does not work neither.

    Please help me, is there a workaround?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Max1971
      wrote on last edited by
      #2

      Hi,
      i have the same different problems some years ago, and i have to manage myself with code.

      I get a good solution for me setting for QMainWindow the following flags

      appWindow->setWindowFlags(Qt::Window | Qt::WindowStaysOnBottomHint);

      For a QDialog

      d->setWindowFlags(Qt::Window | Qt::CustomizeWindowHint | Qt::WindowTitleHint);

      To manage the fact the dialog is modal i don't use the flag QT:WindowModal but i write a method where i disable
      application manually (menu etc...) until the user don't close o press button on modal dialog

      1 Reply Last reply
      1

      • Login

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