You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
735 B
35 lines
735 B
#include <QGuiApplication>
|
|
#include <QQmlApplicationEngine>
|
|
#include <iostream>
|
|
|
|
#include "animaux.hpp"
|
|
|
|
using namespace std;
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
Animaux gerard{"Lapin"}, boris{"Paon"};
|
|
|
|
QObject::connect(&gerard, &Animaux::nameChanged,
|
|
&boris, &Animaux::setName
|
|
);
|
|
|
|
gerard.setName("Lièvre");
|
|
|
|
qWarning() << gerard.name() << boris.name() << "\n";
|
|
|
|
|
|
QGuiApplication app(argc, argv);
|
|
|
|
QQmlApplicationEngine engine;
|
|
QObject::connect(
|
|
&engine,
|
|
&QQmlApplicationEngine::objectCreationFailed,
|
|
&app,
|
|
[]() { QCoreApplication::exit(-1); },
|
|
Qt::QueuedConnection);
|
|
engine.loadFromModule("signaux", "Main");
|
|
|
|
return app.exec();
|
|
}
|