igortg / simplewidgets

Rapidly build GUI with Python and Qt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SimpleWidgets

Rapidly build GUI with Python and Qt

Simple Example

The above code construct a dialog, waits for the user input and return window contents in a namedtuple.

from PyQt4.QtGui import QApplication
from simplewidgets.fields import LineTextField, IntField, ChoiceField
from simplewidgets.simplewidget import SimpleDialog

class DemoDialog(SimpleDialog):
    name = LineTextField(label="Name")
    age = IntField(30, label="Age")
    gender = ChoiceField(["Male", "Female"], initial="Female", label="Gender")

app = QApplication([])
demo = DemoDialog()
if demo.exec_accepted():
    data = demo.get_data()

Simple Example

print data
>> SimpleData(name=u'', age=30, gender='Female')

Build Status

About

Rapidly build GUI with Python and Qt

License:GNU Lesser General Public License v3.0


Languages

Language:Python 100.0%