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. QComboBox Drag and Drop
Qt 6.11 is out! See what's new in the release blog

QComboBox Drag and Drop

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

    Dear all, how to use the Drag-and-Drop mechanisms for QComboBox. That is I want to drag a QComboBox and drop it somewhere else in its parent. I want its items in its popup list to remain exactly the same. In other words, the whole QComboBox is the QWidget onto which the Drag and Drop are applied.

    My problem here is as follows: when there is a mouse press event, how to distinguish between (1) open popup list and (2) start a drag.
    
    Several solutions:
    
    1. On the QComboBox, define one region for the "popup list" and one region for the drag.
    2. Put the QComboBox in a larger Qwidget.

    Any help is welcome
    JP

    1 Reply Last reply
    0
    • IamSumitI Offline
      IamSumitI Offline
      IamSumit
      wrote on last edited by
      #2

      Hi and welcome to devnet.

      Before doing anything.
      Go through to the Qt Docs and examples available on web..

      Help Links:
      "find here":http://qt-project.org/doc/qt-5/dnd.html

      hope this helps.

      Be Cute

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        Thanks Iam, but I have already seen the examples and none of them
        does what I'm looking for.
        Please, could someone helps me.

        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