Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    How to apply WindowFlags to MdiSubWindow correctly?

    General and Desktop
    1
    1
    950
    Loading More Posts
    • 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.
    • T
      tyapkov last edited by

      Hello to everebody!
      I have faced the problem while passing the SubWindow to the MdiArea's addSubWindowMethod. In this case the flags are not working correctly. If to specify the Qt::WindowMinimizeButtonHint flag then also close button and window icon are shown. Can anybody explain why does it happen? Thanks!

      Declaration of the SubWindow class:

      @
      SubWindow::SubWindow(QWidget* parent): QMdiSubWindow(parent)
      {

      setShown(true);
      

      }
      @

      The usage of the SubWindow class:

      @
      Qt::WindowFlags flags = Qt::SubWindow | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowMinimizeButtonHint;
      log_subWindow = new SubWindow(this);
      log_subWindow->setWidget(logWindow);

      mdiArea->addSubWindow(log_subWindow, flags);
      @

      [EDIT: code formatting, please wrap in @-tags, Volker]

      1 Reply Last reply Reply Quote 0
      • First post
        Last post