I already tried uninstalling and reinstalling it but the behavior is still the same.
When I start okular from the command line the following warning appears but nothing else:
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
I changed from X11 to wayland because of unrelated reasons and if I run QT_QPA_PLATFORM=wayland okular as suggested okular displays everything just fine.
However I can’t figure out the right way to permanently set this env variable.
Systemwide. Set the variable in /etc/environent. This will make it be used in all applications on the system.
User and application specific. Copy the .edesktop file from /usr/share/applications/ to ~/.local/share/applications/ and add the variable to the Exec line in the new file, like you did in when you ran it from the command line. The reason for copying the .desktop file, is so that the change does not get overwritten on updates.