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 do you drag a button freely within another widget?

How do you drag a button freely within another widget?

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 543 Views 1 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.
  • enjoysmathE Offline
    enjoysmathE Offline
    enjoysmath
    wrote on last edited by
    #1

    Here's my app, it's called Watermelon.

    0_1556261304642_fda2aa61-4eb5-469e-91ae-c4e9e6f1b127-image.png

    For something similar, see bubble.is for web apps. But this is starting out for PyQt5 apps, and also is closer to code (it's as if bubble let's you look at its code and edit it!)

    Anyway, any comments / suggestions welcome. But for one, how do I drag a QPushbutton across another widget like it's in a QGraphicsScene?

    https://github.com/enjoysmath
    https://math.stackexchange.com/users/26327/exercisingmathematician

    jsulmJ 1 Reply Last reply
    0
    • enjoysmathE enjoysmath

      Here's my app, it's called Watermelon.

      0_1556261304642_fda2aa61-4eb5-469e-91ae-c4e9e6f1b127-image.png

      For something similar, see bubble.is for web apps. But this is starting out for PyQt5 apps, and also is closer to code (it's as if bubble let's you look at its code and edit it!)

      Anyway, any comments / suggestions welcome. But for one, how do I drag a QPushbutton across another widget like it's in a QGraphicsScene?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @enjoysmath Take a look at https://doc.qt.io/qt-5/dnd.html

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      enjoysmathE 1 Reply Last reply
      4
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi
        You have to program it.
        https://wiki.qt.io/Widget-moveable-and-resizeable

        1 Reply Last reply
        4
        • enjoysmathE Offline
          enjoysmathE Offline
          enjoysmath
          wrote on last edited by
          #4

          @mrjj

          Hi! I'm going to code it yes. I was just looking for a good article and you've shown me. I want to make it with control points / handles. It's going to be awesome when it's done, but really tough to code. Before anyone can use Watermelon it has to support such & such basic things.

          https://github.com/enjoysmath
          https://math.stackexchange.com/users/26327/exercisingmathematician

          1 Reply Last reply
          0
          • jsulmJ jsulm

            @enjoysmath Take a look at https://doc.qt.io/qt-5/dnd.html

            enjoysmathE Offline
            enjoysmathE Offline
            enjoysmath
            wrote on last edited by
            #5

            @jsulm

            Thanks. You're right. Since bubble.is supports a level of DND, my app has to to be visible at all.

            You'll even be able to DND buttons between windows.

            So right now each class I write supports deepcopy, pickling, and will also now support drag_data.

            https://github.com/enjoysmath
            https://math.stackexchange.com/users/26327/exercisingmathematician

            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