QT读取txt文件

直奔主题,直接上代码app 1.ui QString displayString; QFile file("/home/alvin/text.txt"); if(!file.open(QIODevice::ReadOnly | QIODevice::Text)) {     qDebug()<<"Can't open the file!"<<endl; } while(!file.atEnd()
相关文章
相关标签/搜索