c++ - Where should I reimplement QAbstractItemModel::supportedDragActions()? -
I am moving the project from QT 4.x to 5, and the next function is obsolete: < Pre> Thank you: Edit: I have implemented the function in my CPP, which is set just above the function, which call set up supported drawings (), From: mapLayersModel is a member of this class, this is its announcement: I also had to add a header to qabstractitemmodel.h: I get further errors: and I have to do something wrong. You need your model subclass, i.e. in the same class where you are obsolete In implementing the model & gt; SetSupportedDragActions (QT :: MoveAction); I have researched and apparently I had the same problem with the function to recompile / support the virtual one supported dragging () function and solve it. My newbie is a question, how should I change this kind of work again? In Qabstractitemmodel.h / cpp?
mapmodulelist.cpp: Zero QAbstractItemModel :: setSupportedDragActions (Qt :: DropActions verb) {Q_D (QAbstractItemModel); d-> Supported dragaction = verbs; } Zero MapModuleList :: setupModel () {if (mapLayersModel == faucet) {mapLayersModel = New QStandardItemModel (0); MapLayersModel - & gt; Set Supported Dractions (Qt :: MoveAction); }}
Fixed QStandardItemModel * mapLayersModel;
zero set: imported dragaction (QT :: drop action action);
Invalid use of type 'Class QAbstractItemModelPrivate' d-> Supported dragaction = verbs; ^
class QAbstractItemModelPrivate 'class forwarding announcement QAbstractItemModelPrivate; ^
setSupportedDragActions () function, in order to implement (rather override) this virtual function, it is only necessary if you need drag and drop functionality for your ideas.
Comments
Post a Comment