Skip to content

Instantly share code, notes, and snippets.

@samueltcsantos
Last active June 20, 2016 01:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samueltcsantos/f9ca857c829f0bb9ca761cf276f23470 to your computer and use it in GitHub Desktop.
Save samueltcsantos/f9ca857c829f0bb9ca761cf276f23470 to your computer and use it in GitHub Desktop.
Qt and QDateTime example I
#include <QCoreApplication>
//Lembre de fazer include das classes
#include <QDebug>
#include <QDateTime>
#include <QDate>
#include <QTime>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
// QDate(ano, mes, dia)
// QTime(hora, minuto, segundo)
QDateTime today(QDate(2016, 6,19), QTime(22,10,0));
qDebug() << " today " << today.toString();
return a.exec();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment