API¶
The hotest way to deal with PyQt
Allows a unique way to deal with QtDesigner .ui files.
Example:
from PyQt4 import QtGui
import pycante
class MyWidget(pycante.E("/path/to/file.ui"), AnotherClass);
pass
class MyAnotherWidget(pycante.E(QtGui.QFrame), AnotherClass):
pass
w0 = MyWidget()
w1 = MyAnotherWidget()
BTW, picante in spanish means spicy.
- pycante.E(ui_or_widget)[source]¶
Resolve a qt widget class from ui file path or Widget class
- Params
ui_or_widget: for inerith visual stile (can be a designer ui file)
Return New base class
Example:
from PyQt4 import QtGui import pycante class MyWidget(pycante.E("my/ui/file.ui")): pass class AnotherWidget(pycante.E(QtGui.QFrame)): pass
- pycante.EDir(path)[source]¶
Creates a binding for resolve .ui files in to a given path. If you use a widget class the path is ignored.
- Params:
path: A path to a firectory where all the ui files lives.
Return: Bind to a given path.
Example:
from PyQt4 import QtGui import pycante UI = pycante.EDir("path/to/where/all/my/uis/files/live") class MyWidget(UI("file.ui")); pass class MyAnotherWidget(UI(QtGui.QFrame)): pass w0 = MyWidget() w1 = MyAnotherWidget()