[PyQt] future of (py)qt desktop
Mathias.Born at gmx.de
Mathias.Born at gmx.de
Fri Jan 8 13:00:12 GMT 2016
On 08.01.2016, 23:31:32 Phil Thompson wrote:
> On 7 Jan 2016, at 8:00 pm, Mathias.Born at gmx.de wrote:
>>
>> This was sent to me instead of the mailing list, by Martin Bammer <mrbm74 at gmail.com>:
>> -----------
>>
>> Hi,
>>
>> this is an interesting discussion for me, because I'm planning to port a big application from Python2+PyGtk 32bit to Python3+PyQt 64bit.
>> I had a look at some QtQuick and QML examples which come with PyQt.
>> I'm not really sure if I should use this technique because it has pros and cons (in my opinion):
>> + GUI part is completely separated from the Python code.
>> + QtQuick/QML is fast, even on slow devices.
>> - I have to learn new syntax (QML+JS)
>> - Many examples seem to be for older versions of QtQuick/QML. So using the features of the latest versions is hard to implement.
>>
>> Using the Designer and writing everything in Python would be the straight forward way for porting, but is it the right one?
>> The application has to handle lots of data, list views and tree views with many entries and complex graphics views.
>> Is the recommended way to use QtQuick/QML? The problem I'm facing with this technique is that start developing with it is hard.
>> Although the examples look clear and easy, but when I'm trying to create GUIs with QML I'm running into many problems.
>> Is there a comprehensive tutorial or good book available which goes into detail?
> http://qmlbook.github.io
> You don't say what platforms you are targetting. You would normally
> design a different UI for mobile and desktop. Personally I would
> only consider QML for mobile. An application that has to handle lots
> of data doesn't sound appropriate for mobile. So, based on what you
> have said, I would go the traditional widgets on the desktop route.
> Phil
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt
There is another issue to consider. With qtquick controls, it is
possible to create a GUI that looks and behaves like a QWidgets
GUI. I've tried the examples, and I noticed that these "QML widgets"
are a bit sluggish. For example, there is a noticable delay when
opening a combo box.
Also, each QQuickView opens a new OpenGl context. There is a low,
implementation specific limit for these contexts. Once you exceed
that, switching between contexts (aka windows) takes seconds.
Thus, replicating QWidgets in QtQuick comes with some serious downsides
and no advantages, if you don't make use of the scene graph anyway
in other parts of your program.
But you can use both worlds. One QQuickView for the heavy graphics stuff,
embedded into a widgets based application.
Described here: http://doc.qt.io/qt-5/qwidget.html#createWindowContainer
Best Regards,
Mathias
More information about the PyQt
mailing list