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 can we get back a window with frame in a framelesswindow?

    General and Desktop
    2
    3
    1911
    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.
    • P
      pratik041 last edited by

      When i am setting a window flag
      @Qt::FramelessWindowhint@
      i am getting a frame less window but suppose i want to get the window frame again when some button is clicked. How i can get that?
      Is their any flag to get the window frame again?

      Pratik Agrawal

      1 Reply Last reply Reply Quote 0
      • L
        lgeyer last edited by

        Just clear the flag. Be aware that altering window flags automatically hides the window.
        @
        setWindowFlags(windowFlags() & ~Qt::FramelessWindowHint);
        show();
        @

        1 Reply Last reply Reply Quote 0
        • P
          pratik041 last edited by

          [quote author="Lukas Geyer" date="1332229127"]Just clear the flag. Be aware that altering window flags automatically hides the window.

          setWindowFlags(windowFlags() & ~Qt::FramelessWindowHint);
          show();
          [/quote]

          thanks. I have tried when i was resetting the window flag my window was disappearing because i was not using the show() function. I have got another way of showing the frame of window by using
          @setWindowFlags(Qt::WindowTitleHint)@

          Pratik Agrawal

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