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. Parent tool-widget closes when close child widget
Qt 6.11 is out! See what's new in the release blog

Parent tool-widget closes when close child widget

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 1.2k 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.
  • Y Offline
    Y Offline
    Yury
    wrote on last edited by
    #1

    I have main QWidget with the flag Qt::Tool and child QWidget with default flags. When I close child, it closes the parent also! How can I resolv the problem?
    When I remove flag Qt::Tool from main QWidget, it works normal. But I need this flag in order to avoid taskbar icon of main window (it has systray icon).

    RatzzR raven-worxR 2 Replies Last reply
    0
    • Y Yury

      I have main QWidget with the flag Qt::Tool and child QWidget with default flags. When I close child, it closes the parent also! How can I resolv the problem?
      When I remove flag Qt::Tool from main QWidget, it works normal. But I need this flag in order to avoid taskbar icon of main window (it has systray icon).

      RatzzR Offline
      RatzzR Offline
      Ratzz
      wrote on last edited by
      #2

      @Yury said:

      Qt::Tool

      this may help http://www.qtcentre.org/threads/11713-Qt-Tool

      --Alles ist gut.

      Y 1 Reply Last reply
      4
      • Y Yury

        I have main QWidget with the flag Qt::Tool and child QWidget with default flags. When I close child, it closes the parent also! How can I resolv the problem?
        When I remove flag Qt::Tool from main QWidget, it works normal. But I need this flag in order to avoid taskbar icon of main window (it has systray icon).

        raven-worxR Offline
        raven-worxR Offline
        raven-worx
        Moderators
        wrote on last edited by
        #3

        @Yury
        did you override the closeEvent() handler?
        If yes, did you forget to set the event to accepted?

        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
        If you have a question please use the forum so others can benefit from the solution in the future

        1 Reply Last reply
        0
        • RatzzR Ratzz

          @Yury said:

          Qt::Tool

          this may help http://www.qtcentre.org/threads/11713-Qt-Tool

          Y Offline
          Y Offline
          Yury
          wrote on last edited by
          #4

          @Ratzz Thank you, it helped.

          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