ittam

progetti qt

Apr 28th, 2020
650
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <QFile>
  2. #include <QDebug>
  3.  
  4.    QFile f("/home/luca/luca.dat");
  5.     f.open(QIODevice::WriteOnly | QIODevice::Append);
  6.     QDataStream out(&f);
  7.     out<<quint16(270);
  8.     f.close();
  9.  
  10.     QFile g("/home/luca/luca.dat");
  11.     g.open(QIODevice::ReadOnly);
  12.     QDataStream in(&g);
  13.     qint16 letto;
  14.     in >> letto;
  15.     qDebug() << letto;
RAW Paste Data