• Windows Gui Frontend

    From Jim Schwartz@21:1/5 to All on Sat Apr 1 06:59:50 2023
    I have another question. I have an app written in python, but I want to add
    a windows GUI front end to it. Can this be done in python? What packages would allow me to do that?



    Thanks.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Ram@21:1/5 to Jim Schwartz on Sat Apr 1 12:41:26 2023
    "Jim Schwartz" <[email protected]> writes:
    I have an app written in python, but I want to add a windows
    GUI front end to it.

    To add a GUI, I recommend using tkinter.

    If you want a Windows GUI in the strict sense: I believe,
    there is no standard GUI library on Windows anymore. There
    are several choices today.

    The traditional Windows GUI can be created with Python under
    Windows, but I do not recommend this. You can use modules such
    as win32api, win32con, and win32gui to do this. For example,
    use "win32gui.CreateWindow" to create a new window.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Passin@21:1/5 to Jim Schwartz on Sat Apr 1 08:59:39 2023
    On 4/1/2023 7:59 AM, Jim Schwartz wrote:
    I have another question. I have an app written in python, but I want to add a windows GUI front end to it. Can this be done in python? What packages would allow me to do that?

    WxWindows, Tk, and PyQt are some of the common ones. Be aware that GUI programming can soak up a lot of your time, so be prepared.

    If you want it to work on Linux as well (always a good idea), you will
    need to pay attention to file locations, paths, and path separators as well.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Eryk Sun@21:1/5 to Jim Schwartz on Sat Apr 1 10:37:34 2023
    On 4/1/23, Jim Schwartz <[email protected]> wrote:
    I have another question. I have an app written in python, but I want to
    add a windows GUI front end to it. Can this be done in python? What packages would allow me to do that?

    Here are a few of the GUI toolkit libraries in common use:

    * tkinter (Tk)
    * PyQt (Qt)
    * PySide (Qt)
    * wxPython (wxWidgets)
    * PyGObject (GTK)

    tkinter is included in Python's standard library.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jim Schwartz@21:1/5 to All on Sat Apr 1 12:21:55 2023
    Are there any ide’s that will let me design the screen and convert it to python? I doubt it because it was mentioned that this is time consuming.

    Thanks for the responses everyone. I appreciate it.

    Sent from my iPhone

    On Apr 1, 2023, at 10:37 AM, Eryk Sun <[email protected]> wrote:

    On 4/1/23, Jim Schwartz <[email protected]> wrote:
    I have another question. I have an app written in python, but I want to
    add a windows GUI front end to it. Can this be done in python? What
    packages would allow me to do that?

    Here are a few of the GUI toolkit libraries in common use:

    * tkinter (Tk)
    * PyQt (Qt)
    * PySide (Qt)
    * wxPython (wxWidgets)
    * PyGObject (GTK)

    tkinter is included in Python's standard library.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Passin@21:1/5 to Jim Schwartz on Sat Apr 1 13:28:42 2023
    On 4/1/2023 1:21 PM, Jim Schwartz wrote:
    Are there any ide’s that will let me design the screen and convert it to python? I doubt it because it was mentioned that this is time consuming.

    Depends on what you mean by "let me design the screen", but Pyside
    (which I think is now called Pyside2) may be suitable. It is part the
    Qt framework.


    Thanks for the responses everyone. I appreciate it.

    Sent from my iPhone

    On Apr 1, 2023, at 10:37 AM, Eryk Sun <[email protected]> wrote:

    On 4/1/23, Jim Schwartz <[email protected]> wrote:
    I have another question. I have an app written in python, but I want to >>> add a windows GUI front end to it. Can this be done in python? What
    packages would allow me to do that?

    Here are a few of the GUI toolkit libraries in common use:

    * tkinter (Tk)
    * PyQt (Qt)
    * PySide (Qt)
    * wxPython (wxWidgets)
    * PyGObject (GTK)

    tkinter is included in Python's standard library.


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Eryk Sun@21:1/5 to Jim Schwartz on Sat Apr 1 12:34:27 2023
    On 4/1/23, Jim Schwartz <[email protected]> wrote:
    Are there any ide’s that will let me design the screen and convert it to python? I doubt it because it was mentioned that this is time consuming.

    Thanks for the responses everyone. I appreciate it.

    For Qt, the WYSIWYG UI editor is Qt Designer. The basics are covered
    in the following PySide tutorial:

    https://www.pythonguis.com/pyside2-tutorial

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Igor Korot@21:1/5 to [email protected] on Sat Apr 1 12:30:08 2023
    Hi,

    On Sat, Apr 1, 2023 at 12:24 PM Jim Schwartz <[email protected]> wrote:

    Are there any ide’s that will let me design the screen and convert it to python? I doubt it because it was mentioned that this is time consuming.

    Look at wxGlade (a project designed for wxWidgets).
    You will design you layout and then just save it as a py file.

    No conversion needed.
    And it's pretty straightforward. And very easy.
    You can do it in 5 min or less..

    Thank you.

    I'm sure other libraries mentioned have their own RAD tool.


    Thanks for the responses everyone. I appreciate it.

    Sent from my iPhone

    On Apr 1, 2023, at 10:37 AM, Eryk Sun <[email protected]> wrote:

    On 4/1/23, Jim Schwartz <[email protected]> wrote:
    I have another question. I have an app written in python, but I want to >> add a windows GUI front end to it. Can this be done in python? What
    packages would allow me to do that?

    Here are a few of the GUI toolkit libraries in common use:

    * tkinter (Tk)
    * PyQt (Qt)
    * PySide (Qt)
    * wxPython (wxWidgets)
    * PyGObject (GTK)

    tkinter is included in Python's standard library.

    --
    https://mail.python.org/mailman/listinfo/python-list

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Passin@21:1/5 to Thomas Passin on Sat Apr 1 13:37:38 2023
    On 4/1/2023 1:28 PM, Thomas Passin wrote:
    On 4/1/2023 1:21 PM, Jim Schwartz wrote:
    Are there any ide’s that will let me design the screen and convert it
    to python?  I doubt it because it was mentioned that this is time
    consuming.

    Depends on what you mean by "let me design the screen", but Pyside
    (which I think is now called Pyside2) may be suitable.  It is part the
    Qt framework.

    I should have added that in my experience, the screen layout of controls
    is not the hardest and most time-consuming part of developing GUIs. The
    hard part is getting the screen elements and other components to do what
    you want in the way that you want it.

    For example, the Tk.Text class can be used as a fairly full-featured
    editor, but try figuring out how to highlight part of the text - not so obvious. Or say you decide you want to have a button flash when
    clicked, but you don't like the standard flash effect and want to change
    it. Those are a few of the kinds of things that you have to deal with
    and that soak up the time. It's not usually screen design.


    Sent from my iPhone

    On Apr 1, 2023, at 10:37 AM, Eryk Sun <[email protected]> wrote:

    On 4/1/23, Jim Schwartz <[email protected]> wrote:
    I have another question.  I have an app written in python, but I
    want to
    add a windows GUI front end to it.  Can this be done in python?  What >>>> packages would allow me to do that?

    Here are a few of the GUI toolkit libraries in common use:

        * tkinter (Tk)
        * PyQt (Qt)
        * PySide (Qt)
        * wxPython (wxWidgets)
        * PyGObject (GTK)

    tkinter is included in Python's standard library.



    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Igor Korot@21:1/5 to [email protected] on Sat Apr 1 12:47:33 2023
    Hi, Thomas,

    On Sat, Apr 1, 2023 at 12:40 PM Thomas Passin <[email protected]> wrote:

    On 4/1/2023 1:28 PM, Thomas Passin wrote:
    On 4/1/2023 1:21 PM, Jim Schwartz wrote:
    Are there any ide’s that will let me design the screen and convert it
    to python? I doubt it because it was mentioned that this is time
    consuming.

    Depends on what you mean by "let me design the screen", but Pyside
    (which I think is now called Pyside2) may be suitable. It is part the
    Qt framework.

    I should have added that in my experience, the screen layout of controls
    is not the hardest and most time-consuming part of developing GUIs. The
    hard part is getting the screen elements and other components to do what
    you want in the way that you want it.

    For example, the Tk.Text class can be used as a fairly full-featured
    editor, but try figuring out how to highlight part of the text - not so obvious. Or say you decide you want to have a button flash when
    clicked, but you don't like the standard flash effect and want to change
    it. Those are a few of the kinds of things that you have to deal with
    and that soak up the time. It's not usually screen design.

    I suggest going with wxPython/wxGlade.

    Thank you.



    Sent from my iPhone

    On Apr 1, 2023, at 10:37 AM, Eryk Sun <[email protected]> wrote:

    On 4/1/23, Jim Schwartz <[email protected]> wrote:
    I have another question. I have an app written in python, but I
    want to
    add a windows GUI front end to it. Can this be done in python? What >>>> packages would allow me to do that?

    Here are a few of the GUI toolkit libraries in common use:

    * tkinter (Tk)
    * PyQt (Qt)
    * PySide (Qt)
    * wxPython (wxWidgets)
    * PyGObject (GTK)

    tkinter is included in Python's standard library.



    --
    https://mail.python.org/mailman/listinfo/python-list

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dietmar Schwertberger@21:1/5 to Igor Korot on Sat Apr 1 19:47:50 2023
    On 01.04.2023 19:30, Igor Korot wrote:
    Look at wxGlade (a project designed for wxWidgets). You will design
    you layout and then just save it as a py file.

    wxGlade also includes a tutorial to get you started with wxPython
    itself. You should be able create basic GUIs within a few hours.
    See https://discuss.wxpython.org/ for support on wxPython and the
    wxGlade mailing list.

    Regards,

    Dietmar

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mats Wichmann@21:1/5 to Eryk Sun on Sat Apr 1 12:47:51 2023
    On 4/1/23 11:34, Eryk Sun wrote:
    On 4/1/23, Jim Schwartz <[email protected]> wrote:
    Are there any ide’s that will let me design the screen and convert it to >> python? I doubt it because it was mentioned that this is time consuming.

    Thanks for the responses everyone. I appreciate it.

    For Qt, the WYSIWYG UI editor is Qt Designer. The basics are covered
    in the following PySide tutorial:

    https://www.pythonguis.com/pyside2-tutorial

    Also here is a decent tutorial:

    https://realpython.com/qt-designer-python/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Egon Frerich@21:1/5 to All on Sat Apr 1 21:16:28 2023
    tkinter is part of python

    e.

    Am 01.04.23 um 13:59 schrieb Jim Schwartz:
    I have another question. I have an app written in python, but I want to add a windows GUI front end to it. Can this be done in python? What packages would allow me to do that?



    Thanks.


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rbowman@21:1/5 to Eryk Sun on Sat Apr 1 20:26:01 2023
    On Sat, 1 Apr 2023 10:37:34 -0500, Eryk Sun wrote:

    On 4/1/23, Jim Schwartz <[email protected]> wrote:
    I have another question. I have an app written in python, but I want
    to add a windows GUI front end to it. Can this be done in python?
    What packages would allow me to do that?

    Here are a few of the GUI toolkit libraries in common use:

    * tkinter (Tk)
    * PyQt (Qt)
    * PySide (Qt)
    * wxPython (wxWidgets)
    * PyGObject (GTK)

    tkinter is included in Python's standard library.

    Not to go into a lot of history, if this is a commercial application, go
    with PySide rather than PyQt. They are very close, if not identical, until
    you get to licensing.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Barry Scott@21:1/5 to All on Sat Apr 1 22:11:56 2023
    On 1 Apr 2023, at 18:47, Igor Korot <[email protected]> wrote:

    I suggest going with wxPython/wxGlade.

    I ported all my wxPython code to PyQt and have not regretted it.

    wxPython was (its been a while so may not be an issue now) far to
    hard to make consistent across OS, my apps run on Linux, macOS and Windows.
    I found that PyQt was easier to get working.

    Barry

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Passin@21:1/5 to Barry Scott on Sat Apr 1 17:33:16 2023
    On 4/1/2023 5:11 PM, Barry Scott wrote:


    On 1 Apr 2023, at 18:47, Igor Korot <[email protected]> wrote:

    I suggest going with wxPython/wxGlade.

    I ported all my wxPython code to PyQt and have not regretted it.

    wxPython was (its been a while so may not be an issue now) far to
    hard to make consistent across OS, my apps run on Linux, macOS and Windows.
    I found that PyQt was easier to get working.

    Barry


    Having worked with both, I'd rather use PyQt, although Tk might be
    easier to get a toy app going with. Both editing windows and packing
    are easier for me to understand with PyQt, for one thing.

    OTOH, Qt isn't free for commercial use and the OP seems to be
    speculating on coming up with a product to sell at some point.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alan Gauld@21:1/5 to Jim Schwartz on Sun Apr 2 00:13:36 2023
    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.
    There are some tools somewhat similar to the Java Swing and
    FX GUI builders with varying degrees of bugginess.

    And there are a few bespoke GUI type tools such as Dabo for
    building specific types of applications.

    But most Python GUI developers seem to prefer to just hard
    code the Python, once you get used to it there's not much
    time saving with the GUI tools.

    The real time consuming stuff in building GUIs is getting
    the basic design right and keeping all the controls,
    keyboard bindings and menus in sync. State management
    in other words.

    I did a deep dive examination of GUI builders back around
    v2.6 and came away less than enthused. Things may have
    improved since then but I've seen no real evidence of
    that.

    --
    Alan G
    Author of the Learn to Program web site
    http://www.alan-g.me.uk/
    http://www.amazon.com/author/alan_gauld
    Follow my photo-blog on Flickr at:
    http://www.flickr.com/photos/alangauldphotos

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grant Edwards@21:1/5 to Thomas Passin on Sat Apr 1 15:22:50 2023
    On 2023-04-01, Thomas Passin <[email protected]> wrote:

    Having worked with both, I'd rather use PyQt, although Tk might be
    easier to get a toy app going with. Both editing windows and packing
    are easier for me to understand with PyQt, for one thing.

    With tk it is _very_ easy to get small apps going. As the apps get
    larger and more complex, I find it easier to use wxPython or pyGTK
    (never tried pyQt). However, if you want to package that small app
    using cxfreeze (or whatever) tk tends to produce pretty large bundles
    compared to others.

    --
    Grant

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jach Feng@21:1/5 to All on Sat Apr 1 19:12:58 2023
    Jim Schwartz 在 2023年4月1日 星期六晚上8:00:19 [UTC+8] 的信中寫道:
    I have another question. I have an app written in python, but I want to add a windows GUI front end to it. Can this be done in python? What packages would allow me to do that?



    Thanks.
    There is a GUI Generator for tkinter
    https://page.sourceforge.net/

    --Jach

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael Torrie@21:1/5 to Thomas Passin on Sat Apr 1 19:19:17 2023
    On 4/1/23 15:33, Thomas Passin wrote:
    OTOH, Qt isn't free for commercial use and the OP seems to be
    speculating on coming up with a product to sell at some point.

    Careful. That's not actually true, even though the marketing team at Qt
    lets people believe it is. Qt is licensed under the LGPL, which you can definitely use in a proprietary, close-source app, provided you use the dynamically-linked version (which PySide does of course) and do not
    modify it.

    Qt's commerical licensing is very hostile to small companies, I can say
    that much. It's too bad really. But the LGPL will work for most
    companies, except for those that might wish to use the embedded version,
    such as in cars where being able to abide by the terms of the LGPL
    becomes difficult.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rbowman@21:1/5 to Michael Torrie on Sun Apr 2 02:26:14 2023
    On Sat, 1 Apr 2023 19:19:17 -0600, Michael Torrie wrote:


    Qt's commerical licensing is very hostile to small companies, I can say
    that much. It's too bad really. But the LGPL will work for most
    companies, except for those that might wish to use the embedded version,
    such as in cars where being able to abide by the terms of the LGPL
    becomes difficult.

    Even when the trolls had it the arcane requirements for commercial
    licensing drove many away. I sometimes think 'Side' is actually Finnish
    for 'up yours, Riverbank Computing'.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dietmar Schwertberger@21:1/5 to Alan Gauld on Sun Apr 2 13:09:03 2023
    On 02.04.2023 01:13, Alan Gauld wrote:
    I did a deep dive examination of GUI builders back around
    v2.6 and came away less than enthused. Things may have
    improved since then but I've seen no real evidence of
    that.
    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.

    Regards,

    Dietmar

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael Torrie@21:1/5 to Dietmar Schwertberger on Sun Apr 2 08:45:46 2023
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael Torrie@21:1/5 to Eryk Sun on Sun Apr 2 08:46:34 2023
    On 4/1/23 09:37, Eryk Sun wrote:
    Here are a few of the GUI toolkit libraries in common use:

    * tkinter (Tk)
    * PyQt (Qt)
    * PySide (Qt)
    * wxPython (wxWidgets)
    * PyGObject (GTK)

    tkinter is included in Python's standard library.

    Another good one is Kivy. Especially if you ever want to target mobile
    in the future. https://kivy.org/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dietmar Schwertberger@21:1/5 to Michael Torrie on Sun Apr 2 17:09:06 2023
    On 02.04.2023 16:45, Michael Torrie wrote:
    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.

    I did not talk about pixel placement with wxGlade. That's not supported.
    It's of course using sizers and with a hierarchy of sizers it's much easier
    to rearrange things than it would be with pixel placement.

    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

    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.

    I've tried wxGlade but never could get into it, or wxWidgets in general.

    Which version? Up to 0.7.2 I agree.

    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
    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.

    Regards,

    Dietmar

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael Torrie@21:1/5 to Dietmar Schwertberger on Sun Apr 2 10:20:53 2023
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael Torrie@21:1/5 to Dietmar Schwertberger on Sun Apr 2 10:26:32 2023
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dietmar Schwertberger@21:1/5 to Michael Torrie on Sun Apr 2 19:52:05 2023
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dietmar Schwertberger@21:1/5 to Michael Torrie on Sun Apr 2 20:02:49 2023
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Igor Korot@21:1/5 to [email protected] on Sun Apr 2 14:11:34 2023
    Hi, Dietmer,

    On Sun, Apr 2, 2023 at 1:14 PM Dietmar Schwertberger <[email protected]> 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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rbowman@21:1/5 to Dietmar Schwertberger on Sun Apr 2 20:55:57 2023
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grant Edwards@21:1/5 to Michael Torrie on Sun Apr 2 13:50:45 2023
    On 2023-04-02, Michael Torrie <[email protected]> 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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dn@21:1/5 to Michael Torrie on Mon Apr 3 10:33:35 2023
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rbowman@21:1/5 to Grant Edwards on Mon Apr 3 03:29:43 2023
    On Sun, 02 Apr 2023 13:50:45 -0700 (PDT), Grant Edwards wrote:

    On 2023-04-02, Michael Torrie <[email protected]> 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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rolf Blum@21:1/5 to All on Mon Apr 3 11:09:55 2023
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Loren@21:1/5 to [email protected] on Tue Apr 4 21:24:39 2023
    On Sat, 1 Apr 2023 06:59:50 -0500, "Jim Schwartz"
    <[email protected]> wrote:

    I have another question. I have an app written in python, but I want to add >a windows GUI front end to it. Can this be done in python? What packages >would allow me to do that?

    I recently found out about PySimpleGUI and have been using it for the
    type of thing you are doing. It greatly simplifies the code for the
    Tkinter, QT, WxGUI libraries. The pysimplegui.org site has lots of
    examples. It is much easier to learn than using the GUI libraries
    directly.

    Loren

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From moi@21:1/5 to All on Wed Apr 5 01:29:53 2023
    Qt on Windows, version does not matter.

    All the applications I wrote with "Qt4" are no more working
    properly and correctly with "Qt5".

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)