Skip to content
Permalink
Browse files

Initial work on QML widget configuration

  • Loading branch information
m-kuhn authored and signedav committed Sep 5, 2018
1 parent a5d7c17 commit ae68549186260c2075154775ea74b3f7a4ccd7fe
Showing with 12 additions and 1 deletion.
  1. +10 −0 src/app/qgsattributesformproperties.cpp
  2. +2 −1 src/app/qgsattributesformproperties.h
@@ -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()
@@ -77,7 +77,8 @@ class APP_EXPORT QgsAttributesFormProperties : public QWidget, private Ui_QgsAtt
{
Field,
Relation,
Container
Container,
QmlWidget
};

//do we need that

0 comments on commit ae68549

Please sign in to comment.
You can’t perform that action at this time.