Skip to content

Commit ae68549

Browse files
m-kuhnsignedav
authored andcommitted
Initial work on QML widget configuration
1 parent a5d7c17 commit ae68549

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/app/qgsattributesformproperties.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,16 @@ void QgsAttributesFormProperties::initAvailableWidgetsTree()
133133
item->setData( 0, FieldNameRole, relation.id() );
134134
}
135135
catitem->setExpanded( true );
136+
137+
// QML widget
138+
catItemData = DnDTreeItemData( DnDTreeItemData::Container, QStringLiteral( "Other" ), tr( "Other Widgets" ) );
139+
catitem = mAvailableWidgetsTree->addItem( mAvailableWidgetsTree->invisibleRootItem(), catItemData );
140+
141+
DnDTreeItemData itemData = DnDTreeItemData( DnDTreeItemData::QmlWidget, QStringLiteral( "QmlWidget" ), tr( "QML Widget" ) );
142+
itemData.setShowLabel( true );
143+
144+
QTreeWidgetItem *item = mAvailableWidgetsTree->addItem( catitem, itemData );
145+
catitem ->setExpanded( true );
136146
}
137147

138148
void QgsAttributesFormProperties::initFormLayoutTree()

src/app/qgsattributesformproperties.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ class APP_EXPORT QgsAttributesFormProperties : public QWidget, private Ui_QgsAtt
7777
{
7878
Field,
7979
Relation,
80-
Container
80+
Container,
81+
QmlWidget
8182
};
8283

8384
//do we need that

0 commit comments

Comments
 (0)