While testing T6330: Kleopatra: Additional Expiry handling, I got the message that a signing key I had selected wasn't suitable for signing. It turned out that this (test) key was a certify-encryption-authentication key, but not a signing key. Kleopatra still offered this key in the signing certificate drop-down of the Sign/Encrypt dialog.
Turns out that the root cause is a 19 years old workaround for a bug in an ancient version of gpgme.