Qt 6.11 is out! See what's new in the release
blog
-
Bonjour,
Lorsque j'utilise "Window" en paramètre la fenêtre enfant ne s'affiche pas.
Voici le code:int main(int argc, char *argv[]) { QApplication a(argc, argv); QWidget *Window = new QWidget(); Window->setWindowTitle("Fenêtre parent"); Window->setGeometry(10,10,600,400); Window->show(); QWidget *childWindow = new QWidget(Window); childWindow->setWindowTitle("Fenêtre enfant"); childWindow->setGeometry(20,20,300,200); childWindow->show(); return QCoreApplication::exec(); Merci de votre aide. -
Bonjour,
Lorsque j'utilise "Window" en paramètre la fenêtre enfant ne s'affiche pas.
Voici le code:int main(int argc, char *argv[]) { QApplication a(argc, argv); QWidget *Window = new QWidget(); Window->setWindowTitle("Fenêtre parent"); Window->setGeometry(10,10,600,400); Window->show(); QWidget *childWindow = new QWidget(Window); childWindow->setWindowTitle("Fenêtre enfant"); childWindow->setGeometry(20,20,300,200); childWindow->show(); return QCoreApplication::exec(); Merci de votre aide.@lacombe said in Création de fenêtres avec des widget:
return QCoreApplication::exec();
The QCoreApplication class provides an event loop for Qt applications without UI.
?
QApplication a(argc, argv); ... return a.exec(); -
S SGaist moved this topic from General and Desktop