-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InsertRow/SetRow #194
Comments
How can I use the "insertRow" and "setRow" when I using a model in my component with qml? I've tried jsonObject and there dosen't have this method, I've tried Vector and got "DimensionMismatch: array could not be broadcast to match destination". import QtQuick 2.0
import QtQuick.Controls 2.15
import QtQuick.Window
Window {
id: window
width: 700
height: 700
visible: true
ComboBox {
model: tList
textRole: "name"
valueRole: "type"
width: 200
height: 50
currentIndex: 0
onCurrentIndexChanged: {
tList.removeRow(currentIndex)
tList.insertRow(currentIndex,{
name: "New Item",
type: "New Type"
})
}
delegate: ItemDelegate {
width: parent.width
height: 40
contentItem: Row {
spacing: 10
Text {
text: name
font.pixelSize: 20
verticalAlignment: Text.AlignVCenter
}
}
}
}
} |
Hi, regarding Inserting and removing rows with the Julia item model is shown in these examples:
There is also the tableview test that shows the full functionality, but it's a little less readable: |
Thanks, the second example of |
When I use 'TableViewColumn' in the section of 'TableView', I got the following error: "TableViewColumn is not a type". How can I settle this promblem without changing the way to building a table?
My code is as follows:
The text was updated successfully, but these errors were encountered: