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. Mouse drag and Select Event in Qt
QtWS25 Last Chance

Mouse drag and Select Event in Qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 1.4k 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.
  • sankarapandiyanS Offline
    sankarapandiyanS Offline
    sankarapandiyan
    wrote on last edited by
    #1

    Is it possible to drag and select the number of pushbuttons and set to enable in Qt GUI
    Give me some link for this guys..

    Thanks in advance.

    jsulmJ 1 Reply Last reply
    0
    • sankarapandiyanS sankarapandiyan

      Is it possible to drag and select the number of pushbuttons and set to enable in Qt GUI
      Give me some link for this guys..

      Thanks in advance.

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

      @sankarapandiyan Do you want to do this in Qt Designer or in your app?

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

      sankarapandiyanS 1 Reply Last reply
      1
      • jsulmJ jsulm

        @sankarapandiyan Do you want to do this in Qt Designer or in your app?

        sankarapandiyanS Offline
        sankarapandiyanS Offline
        sankarapandiyan
        wrote on last edited by sankarapandiyan
        #3

        @jsulm I want to do this in my Application..

        I have lot of pushbuttons in ui . So ,here i want to select the pushbuttons by clicking and draging with the help of mouse and make the selected pushbuttons to enabled (SET ENABLED)...

        jsulmJ 1 Reply Last reply
        0
        • sankarapandiyanS sankarapandiyan

          @jsulm I want to do this in my Application..

          I have lot of pushbuttons in ui . So ,here i want to select the pushbuttons by clicking and draging with the help of mouse and make the selected pushbuttons to enabled (SET ENABLED)...

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

          @sankarapandiyan To select the buttons use https://doc.qt.io/qt-5/qwidget.html#mousePressEvent and https://doc.qt.io/qt-5/qwidget.html#mouseReleaseEvent events. Use the start coordinates (from mousePressEvent) and end coordinates (from mouseRelease Event) to calculate the rectangle and then check which widgets (buttons) are inside this rectangle.

          You also can use https://doc.qt.io/qt-5/qrubberband.html to show the user the selection rectangle.

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

          1 Reply Last reply
          2

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved