Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 2.5
- import QtQuick.Controls 2.3
- import Felgo 3.0
- Page {
- id: detailPage
- title: qsTr("Edit Product Item")
- property var productItem
- signal saveProductItem(var productItem)
- rightBarItem: IconButtonBarItem {
- icon: IconType.save
- onClicked: {
- textEditProductItem.focus = false
- productItem.text = textEditProductItem.text
- detailPage.saveProductItem(productItem)
- }
- }
- TextArea {
- id: textEditProductItem
- width: parent.width
- padding: dp(12)
- verticalAlignment: TextEdit.AlignTop
- font.pixelSize: sp(14)
- inputMethodHints: Qt.ImhNoPredictiveText
- placeholderText: qsTr("Product item text")
- }
- Component.onCompleted: {
- console.log(JSON.stringify(productItem))
- textEditProductItem.text = productItem.text
- textEditProductItem.forceActiveFocus()
- textEditProductItem.cursorPosition = productItem.text.length
- }
- }
Add Comment
Please, Sign In to add comment