Important: Please read the Qt Code of Conduct -

QComboBox Drag and Drop

  • 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

  • Hi and welcome to devnet.

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

    Help Links:
    "find here":

    hope this helps.

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

Log in to reply