Important: Please read the Qt Code of Conduct -

QTextEdit save to a text file

  • i 'm completely new to QT, I am working on a c++ mini project that operates on a text file now i am trying to create a gui for that project, all i need is a simple gui that takes input from a QTextEdit and saves it to a text file when a button is clicked, then i can run my code on that text file and then display the output on screen, So my question here is how can i create a multi line text input that saves data to a text file?

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    You already have QTextEdit, use QFile to load and store your data.

Log in to reply