How to use KDE Okular's document view widget in a Python Qt app?
问题 I am writing a desktop application in Python (3.4) on Linux using Qt (4.8) and PyQt. Is there a way to use/import Okular's pdf view functionality as a widget? If yes, how? 回答1: This works for me: import sys from PyKDE4.kdecore import ki18n, KAboutData, KCmdLineArgs from PyKDE4.kdecore import KLibLoader as ll from PyKDE4.kdeui import KApplication import PyKDE4.kparts as kp appName = "KApplication" catalog = "" programName = ki18n ("KApplication") version = "1.0" description = ki18n (