Thank you for your reply, but i tried this and i have a runTime error
#include <QApplication>
#include <QtWidgets>
int main(int argc, char *argv[])
{
QFile monFichier
("C:/Users/amine/Downloads/dcis/dcis1.txt");
double x = 0.0;
double y = 0.0;
line = ts.readLine();
x = s.at(0).toDouble();
y = s.at(1).toDouble();
lcd1->move(100, 100);
lcd2->move(170, 100);
lcd1->display(x);
lcd2->display(y);
f.show();
return app.exec();
}
#include <QApplication>
#include <QtWidgets>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QWidget f;
QFile monFichier("C:/Users/amine/Downloads/dcis/dcis1.txt");
double x = 0.0;
double y = 0.0;
QTextStream ts(&monFichier);
QString line;
line = ts.readLine();
QStringList s = line.split(" ",QString::SkipEmptyParts);
x = s.at(0).toDouble();
y = s.at(1).toDouble();
QLCDNumber *lcd1 = new QLCDNumber(&f);
lcd1->setSegmentStyle(QLCDNumber::Flat);
lcd1->move(100, 100);
QLCDNumber *lcd2 = new QLCDNumber(&f);
lcd2->setSegmentStyle(QLCDNumber::Flat);
lcd2->move(170, 100);
lcd1->display(x);
lcd2->display(y);
f.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
Added after 10 minutes:
there are some spaces in the begining and between the coordinates
Bookmarks