Hi, I’m writing a simple program with Qt 5.0 and I’d be interested, via a button, to save the written text of a text in a .Txt file in the same folder where there are all the program files.
Then, again using a button, I’d be interested to open a file manager window and choose here another text file which is opened in the text.
Sorry for the various repetition of the word text; cordial greetings.
This is the code:
import QtQuick 2.0
import Ubuntu.Components 0.1
Rectangle {
width: 300
height: 300
color: "lightgray"
TextArea {
id:testo
width: units.gu(37)
height: units.gu(6)
contentWidth: units.gu(30)
contentHeight: units.gu(60)
activeFocusOnPress : true
}
Column{
anchors.centerIn: parent
spacing: parent.width/6
Button{
id: exitButton
text: "load"
}
Button{
id:savebutton
text:"save"
onClicked:???????
}
}
}
↧