Projet TTPA (Table Tennis Performance Analyser)  1.3
BTS SN 2019
Fonctions
Référence du fichier ecran-TTPA/main.cpp

Programme principal ecran-TTPA. Plus de détails...

#include "ttpaihm.h"
#include <QApplication>

Fonctions

int main (int argc, char *argv[])
 

Description détaillée

Crée et affiche la fenêtre principale de l'application ecran-TTPA

Auteur
Botella-Broc Yohann
Version
0.1

Documentation des fonctions

◆ main()

main ( int  argc,
char *  argv[] 
)
Paramètres
argc
argv[]
Renvoie
int
23 {
24  QApplication a(argc, argv);
25 
26  TtpaIhm w; // crée la fenêtre principale de l'application
27  w.show(); // affiche la fenêtre principale de l'application
28 
29  // Le splash
30  QSplashScreen splash;
31  // En avant-plan et sans décoration (titre ...)
32  splash.setWindowFlags(Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint);
33  // L'image de l'écran de démarrage
34  splash.setPixmap(QPixmap(":logo-la-salle.png"));
35  // On affiche
36  splash.show();
37  // On peut afficher un message sur l'image
38  splash.showMessage(QString::fromUtf8("Lancement de l'application ..."), Qt::AlignHCenter | Qt::AlignTop, Qt::black);
39  // On ferme le splash après un certain temps (ici 2 s)
40  QTimer::singleShot(2000, &splash, SLOT(close()));
41  // On affiche l'application
42  QTimer::singleShot(2000, &w, SLOT(show()));
43 
44 
45  return a.exec();
46 }
La fenêtre principale de l&#39;application.
Definition: ttpaihm.h:43