mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 07:33:57 -06:00
Recreate editingFinished signal behaviour without using TextArea::editingFinished
Apparently, editingFinished was only added in Qt 5.6, so we cannot use it. So we have to manually recreate the behaviour. Contributes to CURA-342
This commit is contained in:
parent
0745b3bbf5
commit
898c621b6f
1 changed files with 17 additions and 2 deletions
|
@ -3,7 +3,6 @@
|
||||||
|
|
||||||
import QtQuick 2.1
|
import QtQuick 2.1
|
||||||
import QtQuick.Controls 1.1
|
import QtQuick.Controls 1.1
|
||||||
import QtQuick.Dialogs 1.2
|
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
|
@ -28,7 +27,23 @@ Item
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
onEditingFinished: base.editingFinished()
|
Keys.onReturnPressed:
|
||||||
|
{
|
||||||
|
base.editingFinished()
|
||||||
|
}
|
||||||
|
|
||||||
|
Keys.onEnterPressed:
|
||||||
|
{
|
||||||
|
base.editingFinished()
|
||||||
|
}
|
||||||
|
|
||||||
|
onActiveFocusChanged:
|
||||||
|
{
|
||||||
|
if(!activeFocus)
|
||||||
|
{
|
||||||
|
base.editingFinished()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label
|
Label
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue