EComboBox and StringListEdit improvments
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
#include <QStandardItemModel>
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
#include <QHeaderView>
|
||||
#include <QStandardItemModel>
|
||||
#include "ecombobox.h"
|
||||
#include "qad_types.h"
|
||||
|
||||
|
||||
class EModel: public QStandardItemModel {
|
||||
class QAD_WIDGETS_EXPORT EModel: public QStandardItemModel {
|
||||
public:
|
||||
EModel(QObject * parent = 0): QStandardItemModel(parent) {
|
||||
#if QT_VERSION < 0x050000
|
||||
@@ -21,10 +20,12 @@ protected:
|
||||
}
|
||||
#if QT_VERSION >= 0x050000
|
||||
Qt::DropActions supportedDragActions() const {return Qt::MoveAction;}
|
||||
Qt::DropActions supportedDropActions() const {return Qt::MoveAction;}
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
||||
EComboBox::EComboBox(QWidget * parent): QComboBox(parent) {
|
||||
setView(&iv);
|
||||
setModel(new EModel());
|
||||
@@ -52,6 +53,7 @@ EComboBox::EComboBox(QWidget * parent): QComboBox(parent) {
|
||||
header.layout()->addWidget(&filter);
|
||||
header.setParent(iv.header());
|
||||
connect(&filter, SIGNAL(textChanged(QString)), this, SLOT(filterChanged(QString)));
|
||||
connect(model(), &EModel::layoutChanged, this, &EComboBox::rowsChanged);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user