On Sat, 11 Aug 2018 11:37:18 -0700 (PDT)
"Edward K. Ream" <edream...@gmail.com> wrote:

> I can get a Turtle window working outside the
> free_layout/nested_splitter framework. The graphics window is a
> separate window, as expected.
> 
> But I'm stumped at how the widget returned from ns_provide eventually
> gets a parent.  I don't see that happening in the NestedSplitter
> class.  For instance, in either ns.replace_widget or ns.
> replace_widget_at_index.  Well actually, there are calls to
> setParent(None), but why would that help?
> 
> Without a parent I don't understand how the Turtle widget will ever
> become visible.

Who told you parents are essential?  Probably your parents... :-)

I guess setting parents is good practice, but it's not essential.

Perhaps
https://github.com/leo-editor/leo-editor/blob/master/leo/plugins/nested_splitter.py#L865
does it implicitly.

Attached is what I get when I select / Ctrl-B run the first part of the
example, then add a Turtle pane, then select / Ctrl-B run the second
half of the example.

So it's visible and works.  But if your goal's drawing trees in a
QGraphicsScene I don't think you need to create a QGraphicsView of the
scene using free_layout in the first instance, that can always be done
later.

Cheers -Terry

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to