Hi Jesse,

you can use, say, the showEvent() to loop over the widget's ancestors and set all their layouts' content margins to 0. What you are seeing is an accumulation of a bunch of (4 or 5) layouts' contents margins.

Here is a brute force example (there may be side effects, or it may just work, let us know):
http://pastebin.com/pXcDP4v9


Cheers,
frank



On 21/12/13 13:42, Jesse Kretschmer wrote:
I do think this is related to the contents margins of the parent layout, so that's on the right track. Unfortunately I can't figure out how to walk up the tree to find the parent layout.

The properties panel is filled almost edge-to-edge. Given that, it must be possible (somehow) with their panel system.

It does not seem to be user controllable now that I've read the source for PythonPanel <http://docs.thefoundry.co.uk/nuke/70/pythonreference/nukescripts.panels-pysrc.html#PythonPanel>. I'm just hoping some nuke/qt hacker has a trick to navigate up the UI stack. Nuke seems to use a pyui module for all the ui stuff in python. (It does not seem to be the same pyui as http://pyui.sf.net)


On Fri, Dec 20, 2013 at 3:02 PM, Den Serras <denserras...@gmail.com <mailto:denserras...@gmail.com>> wrote:

    Can you use layout.setContentsMargin()?


    On Friday, December 20, 2013, Jesse Kretschmer wrote:

        Also, here's an image if anyone is interested in seeing what I
        mean without running the code:
        http://i.imgur.com/FIk503r.png


        On Fri, Dec 20, 2013 at 11:40 AM, Jesse Kretschmer
        <je...@krets.com> wrote:

            I have a python panel with a QWidget. I would like to find
            a way to get back some real estate. The margin is larger
            than I'd like (roughly 20 pixels).
            Does anyone know of a way to reduce the margin of a
            PythonPanel?
            Example Code: http://pastebin.com/buGcJypr
            Thanks,Jesse



    _______________________________________________
    Nuke-python mailing list
    Nuke-python@support.thefoundry.co.uk
    <mailto:Nuke-python@support.thefoundry.co.uk>,
    http://forums.thefoundry.co.uk/
    http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python




_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to