Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[SOLVED] Require help on Dragging a Row From QTableview and drop into a sub-classed PushButton
roahanramesh last edited by
First of all, thanks for taking time to read my post.
I am trying to acheive the following.
On a form i have an array of pushbuttons (that are subclassed already from QPushbutton to mypushbutton - Events currently handled are EnterEvent and LeaveEvent) .
- I have a QTableView with QSqlQueryModel to fill in the data from a database.
- I need to be able to drag a row from the QTableView to a pushbutton.
(a). Can a QSqlQueryModel be used to achieve this.
(b). What functions do I need to subclass and re-implement in the QTableView.
(c). What additional functions do I need to re-implement in mypushbutton class.
Your thoughts and suggestions would be well appreciated.
giesbert last edited by
drag and drop is well documented, even for models. Have a look "here":http://qt-project.org/doc/qt-4.8/examples-draganddrop.html