[Tkinter-discuss] Tkinter to Qt-whatever

Robert Greschke robert at greschke.com
Wed Nov 13 12:11:24 EST 2019


Hi!

I saw that, but didn't take a look at it. Did I even get a choice? Hmm. I'll look and see if it can handle me. The trigger for all of this was the way things Tkinter look/feel in macOS. I guess I should give tix/ttk stuff a look, again, too. Our stuff doesn't need to look native, but consistent (Linux/Mac/Win) would be nice. The default Linux look is even the same as it was when stuff was still running on SunOS. Everything is generally "big and clunky" which is really nice for field work. No finesse required when the Sun is in your eyes and the wind chill factor is 0F.

I've looked at a bunch of documentation online for Qt stuff, got three books, and all of it is just PyDoc quality and 'Hello World' stuff. "...setIconSize(): This sets the icon size of the toolbar icons for this main window." No!! Never would have guessed that. I sleep with Grayson's book to keep anything from happening to it. :)

Other than just the standard .config() things I haven't needed to really mess with widgets. Color, padding, maybe the width of the scrollbars (they got really narrow on some macOS versions), etc. A bit of Canvas drawing. Rewriting would be OK if there is even less writing!

These are things Tkinter has been fine for: 

www.passcal.nmt.edu/~bob/passcal/software/index.html <http://www.passcal.nmt.edu/~bob/passcal/software/index.html>

It would just be more of the same from here on.

Thanks!

Bob

> On 2019-11-13, at 09:14, Mike Barnett <mike_barnett at hotmail.com> wrote:
> 
> Hi there
> 
> Take a look at PySimpleGUI (http://www.PySimpleGUI.org)
> 
> With it you can write your code once and then easily move between tkinter, Qt, WxPython and Remi (runs in browser).
> 
> Sometimes the only change needed is to the import statement.  Other times only slight changes are needed.
> 
> If you're using only the basic kinds of Widgets and aren't getting overly fancy with styles (aren't changing things like scrollbars down deep inside tkinter), then moving across the GUI frameworks is pretty easy.
> 
> A number of the "Demo Programs" found on the GitHub run on multiple GUI frameworks by only changing the import.  The OpenCV ones are great examples of this.
> 
> But you will be required to "rewrite" your tkinter code.  PySimpleGUI code is up to 10x shorter than tkinter code so it could happen a lot quicker than you think.
> 
> TONS of documentation is available.  The Cookbook is being updated daily at the moment and you can run a bunch of sample code on Trinket (https://pysimplegui.trinket.io/demo-programs).
> 
> It is certainly worth a look.
> 
> -mike

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20191113/550e0326/attachment.html>


More information about the Tkinter-discuss mailing list