layout question

52 views
Skip to first unread message

Todd Widup

unread,
Jun 28, 2015, 10:49:55 PM6/28/15
to python_in...@googlegroups.com
so since I am still getting use to this..I just want to get this idea straight in my head

there is no way in a window to specify the exact placement of a widget, al a a Maya FormLayout.

To work around this, you use multiple layouts to create rows and columns to get everything to place nicely..correct?

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

Justin Israel

unread,
Jun 28, 2015, 11:01:42 PM6/28/15
to python_in...@googlegroups.com
On Mon, Jun 29, 2015 at 2:49 PM Todd Widup <todd....@gmail.com> wrote:
so since I am still getting use to this..I just want to get this idea straight in my head

there is no way in a window to specify the exact placement of a widget, al a a Maya FormLayout.

If you don't use a layout, you get absolute positioning within the parent widget. So you can set the position exactly where you want, and it will not be moved when the parent resizes. If you don't use a layout and don't set a position, all your widgets will pile up at (0,0)
 

To work around this, you use multiple layouts to create rows and columns to get everything to place nicely..correct?

I'm assuming you mean *within* a QFormLayout? QFormLayout gives you 2-column alignment for the labels and the controls. In addition to a string or QLabel, you can put any widget you want in the "label" column. And you can put any widget into the "control" column. If you need complex controls, you can use a layout of widgets in the "control" column, but that should still give you proper alignment of labels and controls.
 

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

--
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/CABBPk37hLN_VsXk5QS9OOqa-bhBBG6ioe89z8ukMVo-U2uJMOQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Todd Widup

unread,
Jun 29, 2015, 9:59:31 PM6/29/15
to python_in...@googlegroups.com
Thanks Justin...hmmm, might try it without again..I tried it once, and it didn't work, but will see, thanks


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

Todd Widup

unread,
Jun 29, 2015, 10:39:35 PM6/29/15
to python_in...@googlegroups.com
hey all...is there some trick or function I need to use/call for a layout-less dialog to work and display my widgets?   mie neer show up...but the dialog opens with no errors 

Justin Israel

unread,
Jun 30, 2015, 1:19:28 AM6/30/15
to python_in...@googlegroups.com
Are you sure you are setting the parent to be the dialog for all the widgets that are not in the layout? Do you have a sample snippet? There shouldn't be a trick. All of the child widgets should show up in the dialog at the absolute parent widget position.

Todd Widup

unread,
Jun 30, 2015, 1:36:50 PM6/30/15
to python_in...@googlegroups.com
It's the set parent I'm sure   
Been looking all over for a flag function that does it but haven't found one  

Sent from my iPhone

Todd Widup

unread,
Jun 30, 2015, 7:20:56 PM6/30/15
to python_in...@googlegroups.com
found it and used it...and it works :D 
thanks all, not sure how I missed that when I was going thru everything
Reply all
Reply to author
Forward
0 new messages