Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] Resize frameless window
Qt 6.12 LTS is out! See what's new in the release blog

[SOLVED] Resize frameless window

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 4.8k Views 2 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hi guys, i'm trying to resize my frameless window.

    @setWindowFlags(Qt::FramelessWindowHint)@

    I can do this using QSizeGrip, but it's different from the original. Example:

    QSizeGrip:

    !http://www.tbi.univie.ac.at/~pmg/tutorials/QT/html/qsizegrip-m.png(http://www.tbi.univie.ac.at/~pmg/tutorials/QT/html/qsizegrip-m.png)!

    Original:

    !http://i5.minus.com/jb2em5OyNcQXbj.jpg(http://i5.minus.com/jb2em5OyNcQXbj.jpg)!

    How to make a frameless window resize like the "original"?

    1 Reply Last reply
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Well, frames serve exactly that purpose so it's a little weird to remove them and try to mimic their functionality, unless you're trying to style the window on you're own of course.

      What you can do is sorta drag and drop. On mouse press determine if and on which border or corner user has pressed and store it in some variable. On mouse move check if you're in a "drag mode" via the said variable and if you are, resize and move the window in the appropriate direction. On mouse release clear the variable.

      Since you're on Windows 7 (judging by the screenshot) don't forget to also handle things like double-click on the upper edge to maximize/demaximize, snap a window to an edge/maximize when dragged to a screen border, demaximize by dragging a window down. Some of those may require you to use some native Window APIs.

      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
      • Unsolved