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. How to make FramelessWindowHint resizable ?
Qt 6.11 is out! See what's new in the release blog

How to make FramelessWindowHint resizable ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 4 Posters 3.8k 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.
  • YunusY Offline
    YunusY Offline
    Yunus
    wrote on last edited by
    #1

    I have a window and this window is Qt::FramelessWindowHint type. I want to be able to resize this window at the same time but I can not.

    When I tried Qt::Popup type, I am able to resize the window and window doesn't have title so everything fine. But since it is a pop-up when I clicked to out of pop-up window it disappears.

    How can I get a QWidget window without a title bar and can be resizable at the same time?

    Thanks.

    JonBJ M Ronel_qtmasterR 3 Replies Last reply
    0
    • YunusY Yunus

      I have a window and this window is Qt::FramelessWindowHint type. I want to be able to resize this window at the same time but I can not.

      When I tried Qt::Popup type, I am able to resize the window and window doesn't have title so everything fine. But since it is a pop-up when I clicked to out of pop-up window it disappears.

      How can I get a QWidget window without a title bar and can be resizable at the same time?

      Thanks.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Yunus
      https://stackoverflow.com/questions/43505580/qt-windows-resizable-frameless-window says you have to do it via native Windows calls.
      A different approach is suggested in https://forum.qt.io/topic/15747/how-to-enable-resizing-of-a-frameless-widget.
      I suggest you try Googling qt FramelessWindowHint resize is you want to find out about resizing a frameless window in Qt.

      1 Reply Last reply
      1
      • YunusY Offline
        YunusY Offline
        Yunus
        wrote on last edited by
        #3

        @JonB said in How to make FramelessWindowHint resizable ?:

        qt FramelessWindowHint resize

        thanks for your answer, my question to you: since pop-up solves my problem, is there anyway to cancel disappear of pop-up window ?

        JonBJ 1 Reply Last reply
        0
        • YunusY Yunus

          @JonB said in How to make FramelessWindowHint resizable ?:

          qt FramelessWindowHint resize

          thanks for your answer, my question to you: since pop-up solves my problem, is there anyway to cancel disappear of pop-up window ?

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @Yunus
          I have a recollection that when I looked through Qt source code the behaviour of "popup" is hard-coded into it at various stages, e.g. the dismissal when you click outside. So I would suggest trying to implement it by popup which is not to behave like a popup should may not be the best solution.

          1 Reply Last reply
          0
          • Pl45m4P Pl45m4 referenced this topic on
          • YunusY Yunus

            I have a window and this window is Qt::FramelessWindowHint type. I want to be able to resize this window at the same time but I can not.

            When I tried Qt::Popup type, I am able to resize the window and window doesn't have title so everything fine. But since it is a pop-up when I clicked to out of pop-up window it disappears.

            How can I get a QWidget window without a title bar and can be resizable at the same time?

            Thanks.

            M Offline
            M Offline
            marksmith
            wrote last edited by marksmith
            #5

            @Yunus said in How to make FramelessWindowHint resizable ?:

            I have a window and this window is Qt::FramelessWindowHint type. I want to be able to resize this window at the same time but I can not.

            When I tried Qt::Popup type, I am able to resize the window and window doesn't have title so everything fine. But since it is a pop-up when I clicked to out of pop-up window it disappears.

            How can I get a QWidget window without a title bar and can be resizable at the same time?

            Thanks.

            Use Qt::FramelessWindowHint and implement manual resizing by handling mouse events (hit-testing edges/corners) since frameless windows don’t provide native resize behavior.

            1 Reply Last reply
            0
            • YunusY Yunus

              I have a window and this window is Qt::FramelessWindowHint type. I want to be able to resize this window at the same time but I can not.

              When I tried Qt::Popup type, I am able to resize the window and window doesn't have title so everything fine. But since it is a pop-up when I clicked to out of pop-up window it disappears.

              How can I get a QWidget window without a title bar and can be resizable at the same time?

              Thanks.

              Ronel_qtmasterR Offline
              Ronel_qtmasterR Offline
              Ronel_qtmaster
              wrote last edited by Ronel_qtmaster
              #6

              @Yunus You will need to attach a qsizegrip to your windows. Check this https://github.com/jordanprog86/QtTransparentWindow.git

              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