ddobrev / QtSharp

Mono/.NET bindings for Qt
Other
571 stars 52 forks source link

Unable to use QTreeWidget #57

Open tezine opened 7 years ago

tezine commented 7 years ago

Hi, It seems QTreeWidgetItem is not working. The following code throws an exception: "System.MissingMethodException: Constructor of type 'QtWidgets.QTreeWidgetItem' not found".

var treeWidget = new QTreeWidget(); treeWidget.ColumnCount = 1; treeWidget.ItemClicked += (widgetItem, i) => Debug.WriteLine("hi"); QTreeWidgetItem item = new QTreeWidgetItem(); item.SetText(0, "Main"); treeWidget.AddTopLevelItem(item);

The problems seems to be related to the line treeWidget.ItemClicked. The event ItemSelectionChanged works perfectly.

hezhaowei commented 7 years ago

up, I got the problem too

ddobrev commented 7 years ago

Hello @tezine @hezhaowei I've been extremely busy with support for templates, I'll let you know as soon as I can check this one out.