QFile won't open the file
问题 I have a program that I basically stole from the Qt website to try to get a file to open. The program refuses to open anything I am confused as to why. I have looked for lots of documentation but found nothing can you please explain why it does not work. #include "mainwindow.h" #include "ui_mainwindow.h" #include <QFile> #include <QTextStream> #include <QString> MainWindow::MainWindow(QWidget *parent) : QWidget(parent) { QFile file("C:/n.txt"); if (!file.open(QIODevice::ReadOnly | QIODevice: