darkadept
darkadept

Reputation: 657

Dragging an item from a QTableView/QSqlTableModel

I want to be able to drag an item (actually a whole row) from a QTableView that has a QSqlTableModel as it's model.

QSqlTableModel::flags(const QModelIndex &index) doesn't return Qt::ItemIsDragEnabled. Does that mean the only way I can get this to work is if I subclass QSqlTableModel and reimplement the flags() method?

Thats seems like overkill just to drag the item.

Upvotes: 3

Views: 1511

Answers (1)

darkadept
darkadept

Reputation: 657

Yes. It is the only way to get it to work.

Upvotes: 2

Related Questions