Ich bin Anfänger in Sachen Python-Qt aber habe ausreichende C++ Erfahrungen.
Mein derzeitiges Projekt welches ich in PyQt programmieren will, stellt ein paar Probleme,
Code: Alles auswählen
#!/usr/bin/env python
#
#hauptfenster.py
#
import sys
from PyQt import *
sys.path.append('./module/sys')
from workspace import *
class Hauptfenster(QMainWindow):
def __init__(self):
QMainWindow.__init__(self)
self.workspace=Workspace(self)
self.setCentralWidget(self.workspace)
self.connect(self.workspace, SIGNAL("clicked()"),
self.updateMenus())
win.setWindowTitle(tr("Meisterhilfe"))
self.createMenus()
def updateMenus(self):
pass
def createMenus(self):
pass
def main(args):
app=QApplication(args)
win=Hauptfenster()
win.show()
app.connect(app, SIGNAL("lastWindowClosed()"),
app, SLOT("quit()"))
app.exec_loop()
Welche Packete benötige ich unter Debian Etch?
Zeile 16 und 18 geben nur Fehler aus.
Die Packete "python-qt3" und "python-qt4" sind bei mir bereits installiert.
Mein Hauptprogramm sieht wie folgt aus,
Code: Alles auswählen
#!/usr/bin/env python
#
#startGUI.py
#
import os
import sys
sys.path.append('./module/sys')
import hauptfenster
if os.name == 'posix':
print "Linux System wurde erkannt."
print "Starte meisterhilfe Programm."
if __name__ == "__main__":
hauptfenster.main(sys.argv)
elif os.name == 'nt':
print "Windows System wurde erkannt."
print "Starte meisterhilfe Programm."
else:
print "Konnte Betriebssystem nicht erkennen ! ! !"
print "Das Programm meisterhilfe wurde nicht gestartet."