#include <QCoreApplication>
#include <QDateTime>
#include <QDebug>

void fonctionQT(QDateTime time, int nb_jours){
    qDebug()<<time.addDays(nb_jours);
}
int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    QDateTime madate = QDateTime::currentDateTime();
    fonctionQT(madate,50);
    return a.exec();
}

Add a code snippet to your website: www.paste.org