Mailing List Archive

1 2  View All
Re: Windows Gui Frontend [ In reply to ]
On 2023-04-02 9:09 a.m., Dietmar Schwertberger wrote:
> That's what I hated with Qt Designer: it does not output Python code
> but  a .ui file.
> This was the point where I could not recommend it to anyone.

Well the thing is you don't need to generate Python code at all. Qt
provides a UI loader class that loads the UI file at run time, builds
the objects in memory, and connects all your signals for you. So much
nicer than code generation.


--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
On 2023-04-02 9:09 a.m., Dietmar Schwertberger wrote:
>> I've tried wxGlade but never could get into it, or wxWidgets in general.
>
> Which version? Up to 0.7.2 I agree.

Been a long time. I was initially turned off by the event handling
system of wx compared to the signals and slots of Gtk and Qt.

> For me QtQuick and QML are a step backwards by some ten years when
> it comes to development speed.
> It's as much 'fun' as doing GUIs with HTML and JavaScript.
> Unfortunately, The Qt Company refused to provide an API for QtQuick to
> be able to use it without QML.
> Anyway, desktop development has long moved out of their focus
> (around 15 years ago when Nokia acquired Trolltech). It's not where
> their commercial customers are.

There are a number of desktop apps built in QtQuick. KDE is
transitioning to QtQuick and it's been alright, not without some
consistency issues. The Cura slicer is another example of a complete
desktop app written in QtQuick which looks and feels quite nicely on all
platforms.

For me, more and more I need to be able to run on mobile as well as
desktop. Qt, GTK, or wx are just not good fits when you need that kind
of portability.

But traditional Qt will be with us or decades yet.
--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
On 02.04.2023 18:20, Michael Torrie wrote:
>> Well the thing is you don't need to generate Python code at all. Qt
>> provides a UI loader class that loads the UI file at run time, builds
>> the objects in memory, and connects all your signals for you.

I know, but having to load the .ui file is awkward.
Even worse, you lose things like code completion.


> So much
> nicer than code generation.

I absolutely disagree on this.

Regards,

Dietmar

--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
On 02.04.2023 18:26, Michael Torrie wrote:
> Been a long time. I was initially turned off by the event handling
> system of wx compared to the signals and slots of Gtk and Qt.
When starting with Python GUIs in 1999, I evaluated both.
Qt event handling had an advantage for C++ where the wxWidgets
people had to use event tables. I don't know when wxWidgets
added dynamic event binding, but with wxPython I don't know
anything else than dynamic binding.


Regards,

Dietmar

--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
Hi, Dietmer,

On Sun, Apr 2, 2023 at 1:14?PM Dietmar Schwertberger
<maillist@schwertberger.de> wrote:
>
> On 02.04.2023 18:26, Michael Torrie wrote:
> > Been a long time. I was initially turned off by the event handling
> > system of wx compared to the signals and slots of Gtk and Qt.
> When starting with Python GUIs in 1999, I evaluated both.
> Qt event handling had an advantage for C++ where the wxWidgets
> people had to use event tables. I don't know when wxWidgets
> added dynamic event binding, but with wxPython I don't know
> anything else than dynamic binding.

I think Bind() was added sometime in 2.9 as GSoC project.
And https://docs.wxwidgets.org/latest/classwx_evt_handler.html#a3b4a42f7263fd0a257a996a078ef802f
proves me correct: it is in "Since 2.9.0"

Thank you.

>
>
> Regards,
>
> Dietmar
>
> --
> https://mail.python.org/mailman/listinfo/python-list
--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
On 2023-04-02, Michael Torrie <torriem@gmail.com> wrote:
> On 4/2/23 05:09, Dietmar Schwertberger wrote:
>> I also did evaluate all the GUI builder from time to time between
>> 2000 and 2016 to find one that I could recommend to colleagues,
>> but could not find one. Then I started contributing to wxGlade
>> and I can say that since a few years it's as easy again to
>> build GUIs as it was with VB6.
>
> [...]
>
> But any modern GUI toolkit has sizers and layout managers. If you're
> manually placing elements you cannot deal with HiDPI or changing window
> sizes.

Ah, that's the brilliant thing about VB6 apps! They only work properly
on machines with the same resoultion and display/font configuration as
the developer.

--
Grant

--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
On Sun, 2 Apr 2023 19:52:05 +0200, Dietmar Schwertberger wrote:

> On 02.04.2023 18:20, Michael Torrie wrote:
>>> Well the thing is you don't need to generate Python code at all. Qt
>>> provides a UI loader class that loads the UI file at run time, builds
>>> the objects in memory, and connects all your signals for you.
>
> I know, but having to load the .ui file is awkward.
> Even worse, you lose things like code completion.

One advantage is customization. It's not Python but we use a GUI system
that supports uids. The underlying data is the same but some clients may
not want certain fields or want them labeled or arranged differently.
--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
On 03/04/2023 02.45, Michael Torrie wrote:
> On 4/2/23 05:09, Dietmar Schwertberger wrote:
>> I also did evaluate all the GUI builder from time to time between
>> 2000 and 2016 to find one that I could recommend to colleagues,
>> but could not find one. Then I started contributing to wxGlade
>> and I can say that since a few years it's as easy again to
>> build GUIs as it was with VB6.
>>
>> I don't want to go back to coding GUIs manually. For most use
>> cases it's a waste of time and often it does not result in the
>> best GUI as it's not so easy to try out and rearrange elements.
>
> But any modern GUI toolkit has sizers and layout managers. If you're
> manually placing elements you cannot deal with HiDPI or changing window
> sizes. Rearranging happens automatically when using sizers and layout
> managers.
>
> That said, the future of GUIs is declarative, using XAML or some other
> domain-specific language like QML. Examples of this include QtQuick
> (the long-term direction Qt is heading), and the various dot Net GUI
> toolkits now popular including MS' own MAUI, WPF, Avalonia.
>
> GUI designer tools (Qt Creator, Visual Studio) can be used to assist and
> help layout the skeleton, but ultimately the GUI is defined by code. And
> it works very well, is adaptive, and can automatically size and
> rearrange. If you want portability to mobile devices, this is where it's at.
>
> I've tried wxGlade but never could get into it, or wxWidgets in general.
> I used to use GTK a lot and did use Glade back then, and dynamically
> loaded the UI definition files at run time. Lately used more Qt with
> QtDesigner, and even extended Designer to support using some custom
> widgets I made.
>
> but the future of Qt is clearly QtQuick, so I've been learning that.
> Has its warts, but in general I like the declarative paradigm. It's a
> learning curve. Overall it's fairly powerful, flexible and portable. I
> have used the designer in Qt Creator a bit, but it's often faster and
> just as intuitive to write it in QML, since you're going to be dropping
> into QML frequently anyway to set properties (not unlike having to set
> widget properties in Qt Designer. So I guess it's 6s using the
> graphical designer vs straight Qt.

Do the two approaches acknowledge each other and enable 'round tripping'?
ie to use the best?better tool for particular jobs (and to cope with
later-maintenance) can one start using one approach, switch to using the
other, and then go back to the first?

--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
On Sun, 02 Apr 2023 13:50:45 -0700 (PDT), Grant Edwards wrote:

> On 2023-04-02, Michael Torrie <torriem@gmail.com> wrote:
>> On 4/2/23 05:09, Dietmar Schwertberger wrote:
>>> I also did evaluate all the GUI builder from time to time between 2000
>>> and 2016 to find one that I could recommend to colleagues, but could
>>> not find one. Then I started contributing to wxGlade and I can say
>>> that since a few years it's as easy again to build GUIs as it was with
>>> VB6.
>>
>> [...]
>>
>> But any modern GUI toolkit has sizers and layout managers. If you're
>> manually placing elements you cannot deal with HiDPI or changing window
>> sizes.
>
> Ah, that's the brilliant thing about VB6 apps! They only work properly
> on machines with the same resoultion and display/font configuration as
> the developer.

VB6 isn't the only thing that goes to hell in a hand basket when you start
playing around with fonts and resolutions. If I were emperor of the world
there would only be monospaced fonts and a limited selection of those.
--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
Am 02.04.2023 um 01:13 schrieb Alan Gauld:
> On 01/04/2023 18:21, Jim Schwartz wrote:
>> Are there any ide’s that will let me design the screen and convert it to python?
>
> There is nothing remotely like the VB or Delphi GUI builders.

The latest Delphi versions themself can create GUIs for Python. I use
Delphi 10.4.2 (Sidney) Professional.
--
https://mail.python.org/mailman/listinfo/python-list

1 2  View All