Skip to content

Commit

Permalink
Initial work on QML widget configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn authored and signedav committed Sep 5, 2018
1 parent a5d7c17 commit ae68549
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/app/qgsattributesformproperties.cpp
Expand Up @@ -133,6 +133,16 @@ void QgsAttributesFormProperties::initAvailableWidgetsTree()
item->setData( 0, FieldNameRole, relation.id() );
}
catitem->setExpanded( true );

// QML widget
catItemData = DnDTreeItemData( DnDTreeItemData::Container, QStringLiteral( "Other" ), tr( "Other Widgets" ) );
catitem = mAvailableWidgetsTree->addItem( mAvailableWidgetsTree->invisibleRootItem(), catItemData );

DnDTreeItemData itemData = DnDTreeItemData( DnDTreeItemData::QmlWidget, QStringLiteral( "QmlWidget" ), tr( "QML Widget" ) );
itemData.setShowLabel( true );

QTreeWidgetItem *item = mAvailableWidgetsTree->addItem( catitem, itemData );
catitem ->setExpanded( true );
}

void QgsAttributesFormProperties::initFormLayoutTree()
Expand Down
3 changes: 2 additions & 1 deletion src/app/qgsattributesformproperties.h
Expand Up @@ -77,7 +77,8 @@ class APP_EXPORT QgsAttributesFormProperties : public QWidget, private Ui_QgsAtt
{
Field,
Relation,
Container
Container,
QmlWidget
};

//do we need that
Expand Down

0 comments on commit ae68549

Please sign in to comment.