Complete beginner. Just starting with QT Creator and I wish to extract text from text files and do 'things' with it.
So far I am easy with C++ and can get the text file into cout. I can also access the lines sequentially into a Qmessagebox on my form using
void myQtApp::read()
{
char buffer [256];
ifstream myfile ("C:test.txt");
while (!myfile.eof())
{
myfile.getline (buffer,256);
}
}
void myQtApp::read()
{
char buffer [256];
ifstream myfile ("C:test.txt");
while (!myfile.eof())
{
myfile.getline (buffer,256);
QMessageBox::about(this,"About myQtApp",buffer);
}
}
To copy to clipboard, switch view to plain text mode
which I have 'cobbled' together from various on-line sources
As a starter I wish to display the file contents in a textEdit box 'textEdit_2' on my form but cannot find a suitable form of words which will compile without some sort of error.
I would be most grateful for some light in the dark, and any pointers to a comprehensive online 'beginner's guide' to QT.
Bookmarks