When opening a torrent file that is larger than 4MB, KTorrent accepts it; however, it rejects every peer that attempts to connect due to "wrong metadata size" - a message that is highly misleading, since the displayed size also does not match the torrent file; however, it's due to exceeding MAX_METADATA_SIZE in libktorrent/src/peer/peer.cpp. At least one torrent file with a 9MB torrent (the Touhou Lossless Music Collection) exists in the wild. When patched, peers connect without issue.
Hit the same issue recently and today I decided to dig into things, found the root cause and also the bug report here. MR submitted to fix it, see https://invent.kde.org/network/libktorrent/-/merge_requests/26.