On Tue, Apr 11, 2017 at 9:51 AM Rudi Hammad <[email protected]> wrote:

> ok, but what you mean with "add spacing between items". Is this a
> treeWidget flag or something that will separate the items with some amount
> of pixels?
> I am not sure to understand
>

Sorry. Looks like only QListView has the first class setSpacing() option.
For tree view you would either have to control the height of the items
through a stylesheet <http://stackoverflow.com/a/29005575/496445>, or by a
delegate or the item defining the sizeHint()
<http://doc.qt.io/qt-4.8/qtreewidgetitem.html#setSizeHint> to have a
specific height


>
> R
>
>
> El lunes, 10 de abril de 2017, 20:23:50 (UTC+1), Justin Israel escribió:
>
> You could also have your drop insert between two items of the drop
> happened in the spacing between them. You currently have logic where if the
> drop was not on an item it will just append it. Add a little spacing to
> your tree widget between items and handle the case where it's between two
> items.
>
> On Tue, Apr 11, 2017, 12:04 AM Rudi Hammad <[email protected]> wrote:
>
> Okey, I think it is working properly now
>
> https://pastebin.com/Nsf0JNU5
>
> I think it works, but is no very precise to get it exactly were you want,
> because the items are too small (and I want them small).
>
> To get a visual reference I tried to do:
>
>
> self.setDropIndicatorShown(True)
>
> When I active this in QtDesigner, you see the line were it is going to be 
> inserted. I am not sure why it is not working here
>
>
> R
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/5eb72a6f-6dfe-4795-8a3f-3df48c2a19c5%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/5eb72a6f-6dfe-4795-8a3f-3df48c2a19c5%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/4dba28f7-e525-481a-a905-6ece9cfb5f5f%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/4dba28f7-e525-481a-a905-6ece9cfb5f5f%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0w9%3DXduwb2cdYOS4g%3DmaVP6%3Ds1XEx7swJ8HVJnoJb25A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to