screencast: python, qt, designer, uic

Posted on Ağustos 14, 2007. Filed under: gezegen-linux, python, qt, screencast |

A screencast which demonstrates creating a user interface with Qt Designer, compiling it to python via pyuic4 and running the generated file. For the curious, Qt also has an on the fly ui compiler which is demonstrated by /usr/share/doc/python-qt4-doc/examples/pyuic/compile-on-the-fly.py

http://cs.bilgi.edu.tr/~canburak/local/screencast/pyqt.avi
size – 1280×800
format – codec: FMP4, 25 fps, 125720 ms

Make a Comment

Make A Comment: ( 4 so far )

blockquote and a tags work here.

4 Responses to “screencast: python, qt, designer, uic”

RSS Feed for Can Burak Çilingir Comments RSS Feed

Merhabalar
Guzel ve egitici bir video olmus. Ote yandan
pyuic4 ile ui dosyalarinin py sekline donusturulmesi
yerine PyUIC (Qt3) veya PyQt4.uic (Qt4) sinifi icindeki load methodu ile ui yi
kullanmak cok daha mantiklidir. Bu sayede UI uzerindeki
bir degisiklik sonrasinda ayni kodu tekrar tekrar eklemekle
ugrasmayacaginiz gibi dinamik ui degisimi yapabilirsiniz.
Ornek Kullanimi :
(QT3)
import PyUIC
FormClass = PyUIC.load(’form.ui’)

(QT4)
Örn:
import PyQt4.uic
current_dir = os.path.dirname(sys.modules[__name__].__file__)
ui_path = os.path.join(current_dir, ‘properties_audio.ui’)
self.ui = PyQt4.uic.loadUi(ui_path, self)

http://www.diotavelli.net/PyQtWiki/LoadingUIFilesAtRuntime

evet, teşekkürler. Bahsettiğim dosyada da benzer bir örnek vardı. kodu da yapıştırayım:

#!/usr/bin/env python
import sys

from PyQt4 import QtCore, QtGui, uic

app = QtGui.QApplication(sys.argv)
form_class, base_class = uic.loadUiType(”demo.ui”)

class DemoImpl(QtGui.QDialog, form_class):
def __init__(self, *args):
QtGui.QWidget.__init__(self, *args)

self.setupUi(self)

@QtCore.pyqtSignature(”")
def on_button1_clicked(self):
for s in “This is a demo”.split(” “):
self.list.addItem(s)

form = DemoImpl()
form.show()
app.exec_()

arkadaşım öncelikle teşekkürler size bi soru soruyorum bana yardımcı olun kullandınız linux sürümünü bana söylermisisniz ve nerden aldınızı şimdiden teşekkürler

Debian ya da Ubuntu kullaniyorum, bu screencast zamaninda hangisini kullandigimi maalesef animsamiyorum.

Kullandigim pencere yoneticisinin adi da dwm.


Where's The Comment Form?

Liked it here?
Why not try sites on the blogroll...