Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Save and load txt file

$
0
0
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:???????                  }                 }             }

Viewing all articles
Browse latest Browse all 4972

Trending Articles