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. Resizable QWidget at the border
Forum Updated to NodeBB v4.3 + New Features

Resizable QWidget at the border

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 773 Views 3 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.
  • N Offline
    N Offline
    NightShadeI
    wrote on last edited by
    #1

    I want to try and make a QWidget that can be resized at the borders, just like a regular window. This means I don't want QSizeGrip , and QDockerWidget doesn't look ideal either - I don't want to be able to "detach" the widget.

    Does QT provide the ability for this in any way? Where I hover my mouse over the border and the mouse changes appropriately.

    Answering that I must do this manually is fine, I just want to confirm this before I begin my adventure to do so in the latest versions.

    SGaistS 1 Reply Last reply
    0
    • N NightShadeI

      I want to try and make a QWidget that can be resized at the borders, just like a regular window. This means I don't want QSizeGrip , and QDockerWidget doesn't look ideal either - I don't want to be able to "detach" the widget.

      Does QT provide the ability for this in any way? Where I hover my mouse over the border and the mouse changes appropriately.

      Answering that I must do this manually is fine, I just want to confirm this before I begin my adventure to do so in the latest versions.

      SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Are you thinking of something like QSplitter ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      N 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Are you thinking of something like QSplitter ?

        N Offline
        N Offline
        NightShadeI
        wrote on last edited by
        #3

        @SGaist I don't think so. Correct me if I'm wrong but this just allows the splitting of widgets inside this parent widget right?

        What I want is one single widget such that whenever the mouse hovers over the border, I can then click and drag, to resize from any side of it - just like a traditional window.

        Pl45m4P 1 Reply Last reply
        0
        • N NightShadeI

          @SGaist I don't think so. Correct me if I'm wrong but this just allows the splitting of widgets inside this parent widget right?

          What I want is one single widget such that whenever the mouse hovers over the border, I can then click and drag, to resize from any side of it - just like a traditional window.

          Pl45m4P Online
          Pl45m4P Online
          Pl45m4
          wrote on last edited by
          #4

          @NightShadeI said in Resizable QWidget at the border:

          whenever the mouse hovers over the border, I can then click and drag, to resize from any side of it - just like a traditional window.

          Your widget should be a toplevel widget with window decoration then?! Like QMainWindow?
          Because when your widget is part of some other layout, the layout and other widgets will limit the movement and expansion.

          Does your widget have Qt::FramelessWindowHint set?
          If so, you might wanna look at this topic here


          If debugging is the process of removing software bugs, then programming must be the process of putting them in.

          ~E. W. Dijkstra

          N 1 Reply Last reply
          0
          • Pl45m4P Pl45m4

            @NightShadeI said in Resizable QWidget at the border:

            whenever the mouse hovers over the border, I can then click and drag, to resize from any side of it - just like a traditional window.

            Your widget should be a toplevel widget with window decoration then?! Like QMainWindow?
            Because when your widget is part of some other layout, the layout and other widgets will limit the movement and expansion.

            Does your widget have Qt::FramelessWindowHint set?
            If so, you might wanna look at this topic here

            N Offline
            N Offline
            NightShadeI
            wrote on last edited by
            #5

            @Pl45m4

            Because when your widget is part of some other layout, the layout and other widgets will limit the movement and expansion

            Actually this is exactly what I want. I don't want something like QMainWindow that isn't bounded, I want it to be bounded inside its parent (QMainWindow) in my case.

            Sounding like there might be no QT magic to get such a thing working? I.e. it must be done manually by handling various events.

            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