QFile file(yourTextFileName);if (!file.open(QIODevice::ReadOnly)){return;}int i=0;QVector pointVec;while(!file.atEnd()){ QString lineString=QString(file.readLine()).trimed(); pointVec<}差不多就是这样吧,可能小地方有错误!