Problems with [Q]GpgME and Qt6

Ron Murray rjmx at
Sat Nov 25 04:15:28 CET 2023

(Crossposting to Qt Forum)
I have an app that works fine in Qt5. I use QGpgME to encrypt/decrypt 
messages and handle key usage. I'm trying to upgrade the app to Qt6, and, 
naturally, expected problems, but this one beats me.
Here, for example, is the code I use to retrieve my secret key list:
QGpgME::KeyListJob *job = QGpgME::openpgp()->keyListJob(false, false, 
// Prepare result vector
std::vector<GpgME::Key> keys;
// Execute it synchronously
GpgME::KeyListResult result = job->exec(QStringList() <<
QStringLiteral(""), // No pattern: get all
true, keys); // Only secret keys
delete job;
Now, this is straight out of the "t-keylist.cpp" test file that comes with 
the GpgME source. It works perfectly well under Qt5. but under Qt6, it 
segfaults at the "job->exec" line. 
Anyone have a clue why it crashes under Qt6?
Ron Murray <rjmx at <mailto:rjmx at> >
PGP Fingerprint: 4D99 70E3 2317 334B 141E 7B63 12F7 E865 B5E2 E761
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Gnupg-users mailing list