pykde

How to use KDE Okular's document view widget in a Python Qt app?

前提是你 提交于 2019-12-10 23:12:17
问题 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 (

Autocompletion not working with PyQT4 and PyKDE4 in most of the IDEs

Deadly 提交于 2019-12-05 21:33:44
I am trying to develop a plasmoid using python. I have tried eclipse with pydev, vim with pythoncomplete, PIDA and also Komodo, but none of them could give me autocmpletion for method names or members for the classes belonging to PyQT4 or PyKDE4. I added the folders in /usr/share/pyshare in the PYTHONPATH list for the IDEs. Do I need to do something else ? Wojciech Bederski There is a number of ways to do it, PyQt4 provides enough information about method names for any object inspecting IDE: >>> from PyQt4 import QtGui >>> dir(QtGui.QToolBox) ['Box', ... contextMenuPolicy', 'count', 'create',