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. MainWindow as modal
Qt 6.11 is out! See what's new in the release blog

MainWindow as modal

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 267 Views 1 Watching
  • 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.
  • C Offline
    C Offline
    cjacquel2021
    wrote on last edited by
    #1

    Hello,
    How to setup a mainWindow of an application as modal.
    When I start it a click outside the mainwindow shoud be disabled ?
    Thank you

    JonBJ 1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      Try
      setWindowModality(Qt::ApplicationModal);

      • When I start it a click outside the mainwindow shoud be disabled ?

      I dont know what you mean here :)

      1 Reply Last reply
      0
      • C cjacquel2021

        Hello,
        How to setup a mainWindow of an application as modal.
        When I start it a click outside the mainwindow shoud be disabled ?
        Thank you

        JonBJ Online
        JonBJ Online
        JonB
        wrote on last edited by
        #3

        @cjacquel2021
        A dubious desire. If you somehow mean this will "disable clicking outside the application" it won't.

        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