mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-02-19 01:59:59 +01:00
New elements panel : fix crash at drag and drop due to a wrong use of QAbstractItemModel
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4353 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -31,8 +31,10 @@ class QList<ElementCollectionItem>;
|
||||
* This class must be herited for specialisation.
|
||||
* This item is used by ElementsCollectionModel for manage the elements collection
|
||||
*/
|
||||
class ElementCollectionItem
|
||||
class ElementCollectionItem : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ElementCollectionItem(ElementCollectionItem *parent = nullptr);
|
||||
virtual ~ElementCollectionItem();
|
||||
@@ -72,6 +74,12 @@ class ElementCollectionItem
|
||||
virtual bool canRemoveContent();
|
||||
virtual bool removeContent();
|
||||
|
||||
signals:
|
||||
void beginInsertRows(ElementCollectionItem *parent, int first, int last);
|
||||
void endInsertRows();
|
||||
void beginRemoveRows(ElementCollectionItem *parent, int first, int last);
|
||||
void endRemoveRows();
|
||||
|
||||
protected:
|
||||
ElementCollectionItem *m_parent_item;
|
||||
QList <ElementCollectionItem *> m_child_items;
|
||||
|
||||
Reference in New Issue
Block a user