You are indeed correct. I am iterating on a minimal test case and the first versions do work. I'm working back to the minimal case that I experienced the issue. This may take some time though.
 
Thank you for your help
 
 
Sent: Thursday, April 11, 2019 at 10:07 AM
From: "Konstantin Shegunov" <kshegu...@gmail.com>
To: "Jason H" <jh...@gmx.com>
Cc: "Konstantin Shegunov" <kshegu...@gmail.com>, "Interests Qt" <interest@qt-project.org>
Subject: Re: [Interest] Signals, slots before the event loop starts?
On Thu, Apr 11, 2019 at 4:57 PM Jason H <jh...@gmx.com> wrote:
Update on this:
It didn't work. I called it, nothing (discernable) happened. Got a bunch of serial port not open errors....

Something else's amiss. Here's the test-case:

 

#include <QCoreApplication>

#include <QDebug>
 
int main(int argc, char *argv[])
{
    QCoreApplication app(argc, argv);
 
    QObject::connect(&app, &QCoreApplication::aboutToQuit, [] () -> void  {
        qDebug() << "Goodbye cruel world!";
    });
    QMetaObject::invokeMethod(&app, &QCoreApplication::quit, Qt::QueuedConnection);
 
    return QCoreApplication::exec();
}

Which produces (as expected):

17:05:37: Debugging starts

Goodbye cruel world!

17:05:38: Debugging has finished

_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to