Python GUI with custom render/drawing
Asked Answered
P

5

8

I am looking for a Python GUI library that I can rewrite the rendering / drawing.

It has to support basic widgets (buttons, combo boxes, list boxes, text editors, scrolls,), layout management, event handling

The thing that I am looking for is to use my custom Direct3D and OpenGL renderer for all of the GUI's drawing / rendering.

edit suggested by S.Lott: I need to use this GUI for a 3D editor, since I have to drag and drop a lot of things from the GUI elements to the 3d render area, I wanted to use a GUI system that renders with Direct3D (preffered) or OpenGL. It also has to have a nice look. It is difficult to achieve this with GUI's like WPF, since WPF does not have a handle. Also it needs to be absolutly free for commercial use.

edit: I would also like to use the rendering context I initialized for the 3d part in my application

Precedent answered 17/11, 2010 at 10:51 Comment(3)
@S.Lott: I considered GTK and PyGTK, but it seems rather difficult to overwrite the render. Plus the fact that it brings in a lot of dependencies. I was looking for something simplePrecedent
"It has to support basic widgets... layout management, event handling" vs. "I was looking for something simple". I don't think you can find both. Please update your questions with enough information that we can figure out what you're looking for.Visby
can you actually provide a sketch of the UI you wish to implement. I Don't think you need quite what you are asking for in normal circumstances, even for a 3D program.Clyve
M
2

I don't know what are you working at, so maybe this is not what you're looking for, but: Have you considered using Blender + its Game Engine?

It supports Python scripting, and provides some APIs to create "standard" GUIs too, while allowing you to do a lot of cool stuff with 3d models. This could be especially useful if your application does a lot of 3d models manipulation..

Then you can "compile" it (it just builds the all-in-one package containing all the dependencies, in a way similar to what py2exe does) for any platform you need.

Maxey answered 25/11, 2010 at 15:24 Comment(0)
T
1

You can use Qt Scene Framework with OpenGL rendering. There are many examples on Nokia site.

Thar answered 22/11, 2010 at 21:42 Comment(0)
T
1

The best Python GUI toolkit is wxPython (also known as wxWidgets).

This is not merely my opinion, see also: wxPython quotes

wxPython is the best and most mature cross-platform GUI toolkit, given a number of constraints. The only reason wxPython isn't the standard Python GUI toolkit is that Tkinter was there first. -- Guido van Rossum

I can't say how easy or hard it would be to add your own renderer.

Tabes answered 23/11, 2010 at 4:26 Comment(1)
It's not that hard to add your own renderer.Galliot
C
0

There are OpenGL bindings in Python that will get you 3D rendering. Personally, I'd use wxpython as your 'gui' manager and use the bindings to do opengl for the rest. Wx has the necessary demos (check the wxpython demos installation) and information in their GLCanvas demos.

Another sample code is here too.

Carrel answered 17/11, 2010 at 12:19 Comment(2)
I would also like to use the rendering context I initialized for the 3d part in my aplicationPrecedent
I believe the OP is looking for a light, logic-only GUI (i.e. without any specific rendering inside). I've seen one and had a google, but apparently it's no longer up, unfortunately.Rigsby
T
0

You might find PyClutter useful.

Teniers answered 23/11, 2010 at 4:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.