precise placement of elements in PySide/PyQT???

49 views
Skip to first unread message

Todd Widup

unread,
Jun 13, 2015, 7:50:21 PM6/13/15
to python_in...@googlegroups.com
is there anything that functions like formLayout in Maya Ui commands in PySide or PyQT that allows exact placement of the UI widget?

looking thru QFormLayout and its parent, I don't see anything that would allow exact placement.

Sorry...just now getting time to really learn PySide..loving what I I see it can do though, and its nice writing a UI that usable in Maya, Mari, and Houdini


thanks
-todd

--
Todd Widup
Creature TD / Technical Artist
to...@toddwidup.com
todd....@gmail.com
www.toddwidup.com

damon shelton

unread,
Jun 13, 2015, 8:08:19 PM6/13/15
to python_in...@googlegroups.com
I always use designer as the basis for all of my guis, they have a grid layout which is very easy to use. Nathan Horne has written a great script called mlib that is written in the basis of using it in maya but you can easily edit it to not solely be used in maya. It allows for directly using the ui files without having to compile them to py beforehand, it does this conversion internally for you. Ui files make it much easier when you have to go in and edit someone else's ui. I know some people on here find it easy to code all of it themselves and there is nothing wrong with that,just personal preference. I just feel it is much easier to use when you are wanting very specific placement and can visualize it while you build it.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CABBPk37zAE-5X0yvQNeGEpLY36L6NWW2zZTP13VueBRE89zU5w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Eric Thivierge

unread,
Jun 13, 2015, 8:08:42 PM6/13/15
to python_in...@googlegroups.com
Hey Todd,

What kind of problems are you having lining up the widgets where you would like them? Any sample images / code we could help with?

Eric T.

--------------------------------------------
Eric Thivierge
http://www.ethivierge.com

--

Todd Widup

unread,
Jun 13, 2015, 8:21:58 PM6/13/15
to python_in...@googlegroups.com
hey Eric..yeah just want to make sure things line up where I expect them to, and Thanks Damon..will look at it.

no samples yet...just getting ideas before I start writing the gui..need I to match a Maya one I just did




For more options, visit https://groups.google.com/d/optout.

Eric Thivierge

unread,
Jun 13, 2015, 9:07:49 PM6/13/15
to python_in...@googlegroups.com
I'd start by making sure you go through any tutorials you can find about creating the GUI's. Also I'd suggest making sure you set the spacing and margins on widgets and layouts to 0 and customize as needed. Stylesheets are helpful too so you can customize the margins, padding, colors, etc easily too.

--------------------------------------------
Eric Thivierge
http://www.ethivierge.com

Justin Israel

unread,
Jun 13, 2015, 9:20:40 PM6/13/15
to python_in...@googlegroups.com
The QLayout approach is definitely different than the Maya UI layouts. In the Maya formLayout, you would specify offsets and constraints directly on the added item. In QFormLayout, you can set overall alignments and spacings, and then you can use arbitrary layouts for the rows, to given them unique spacing, margins, and alignment. 

Todd Widup

unread,
Jun 13, 2015, 9:34:29 PM6/13/15
to python_in...@googlegroups.com
hey again..yup, been working thru a lot of tutorials, and that was one area where the ones I have found just say you do this and then they move on to building the widgets
thanks Justin...will keep that in mind as I go thru.... will probably just start building it and see how it looks...might just be what I expect :)

is there a place that has a lot of documentation on stylesheets?


For more options, visit https://groups.google.com/d/optout.

Justin Israel

unread,
Jun 13, 2015, 9:45:29 PM6/13/15
to python_in...@googlegroups.com
On Sun, Jun 14, 2015 at 1:34 PM Todd Widup <todd....@gmail.com> wrote:
hey again..yup, been working thru a lot of tutorials, and that was one area where the ones I have found just say you do this and then they move on to building the widgets
thanks Justin...will keep that in mind as I go thru.... will probably just start building it and see how it looks...might just be what I expect :)

is there a place that has a lot of documentation on stylesheets?

Probably just the stylesheet guide, would be the way to start:

It lists all of the things that can be applied to each widget type, as well as all of the properties, states, and controls.
 
Reply all
Reply to author
Forward
0 new messages