[PyQt] future of (py)qt desktop

Dietmar Schwertberger maillist at schwertberger.de
Wed Jan 6 15:29:28 GMT 2016


On 06.01.2016 15:46, Phil Thompson wrote:
> I have experimented with ways of eliminating the need for QML. The main problem is that the internal architecture of QML/Quick etc is, let's say, not state of the art. (In the Trolltech days they never would have released something so badly designed.)
>
> QML is fine for what it does - which isn't very much. I would treat it just as a way of creating GUIs (ie. implement views in QML, but implement models and controllers in Python). While you can implement lots more in QML I wouldn't recommend it because it's not easy to re-use or extend code or to manage large amounts of code.
Yes, for pure markup QML would be OK.
It would help a lot if it would be possible to just define the basic GUI 
in QML, but connect events, fill the widgets etc. from Python without 
all the JavaScript mess.
E.g.
self.GUI = qt.load("GUI.qml")
self.GUI.windows["Main"].widgets["Play"].connect(self.OnPlay)
self.GUI.windows["Main"].widgets["list"].fill( ["Title 1", "Title 2"] ) 
# for a short list, otherwise use MVC

def OnPlay(self, event):
     track_index = self.GUI.forms["Main"].widgets["list"].getIndex()

Currently, Qt Quick is a no-go for me. I had a close look and I don't 
like it...

Regards,

Dietmar



More information about the PyQt mailing list