diff --git a/qad/widgets/ecombobox.cpp b/qad/widgets/ecombobox.cpp index 30def57..db2f316 100644 --- a/qad/widgets/ecombobox.cpp +++ b/qad/widgets/ecombobox.cpp @@ -34,7 +34,6 @@ EComboBox::EComboBox(QWidget * parent): QComboBox(parent) { iv.setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); iv.setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel); iv.setVerticalScrollMode(QAbstractItemView::ScrollPerPixel); - iv.setDragDropMode(QAbstractItemView::InternalMove); iv.setMinimumHeight(100); icon.setPixmap(QPixmap(":/icons/edit-find.png")); icon.setScaledContents(true); @@ -64,6 +63,7 @@ QSize EComboBox::sizeHint() const { void EComboBox::showPopup() { + iv.setDragDropMode(isEditable() ? QAbstractItemView::InternalMove : QAbstractItemView::NoDragDrop); filterChanged(filter.text(), true); QComboBox::showPopup(); QRect r = iv.header()->rect();