[Solved] How to subclass QTableView when using the UI editor of QtCreator
-
wrote on 8 Dec 2011, 23:33 last edited by
Hello folks:
I've a QAbstractTableModel subclass working with a QTableView... so far so good.
Now I would like to implement a "Drag and Drop" capability to my QTableView and here's where the problem arose for me, because I need to subclass QTableView but I've used the UI editor of QtCreator for my design, therefore the UI editor has created the QTableView for me, so right now I don't know what to do to achieve what I need.
Thanks in advance guys.
-
wrote on 9 Dec 2011, 00:40 last edited by
In Qt Designer (or the design tool of Qt Creator) you can promote it to a custom widget. The "Using Custom Widgets with Qt Designer":/doc/qt-4.7/designer-using-custom-widgets.html doc has a detailed guide.
-
wrote on 9 Dec 2011, 07:09 last edited by
Thanks for your quick, concise and right answer. I did it exactly as you suggested and it works like a charm.
Thanks again Volker.
1/3