@dwarf telegram-desktop appears to come from rpmfusion; it looks like it has not been rebuilt for qt 6.7, which is the current version in Fedora 40. this should be reported as a bug at https://bugzilla.rpmfusion.org/ if it is not already.
where did you see that error message? was it related to upgrade from f39 to f40 with telegram-desktop installed? if so it's possible that resulted in an incomplete upgrade, yes. try removing telegram-desktop and doing a system update.