[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Basic QQmlComponent question
From:       Jim Baack <jbaack () accelerantsys ! com>
Date:       2017-04-18 15:33:00
Message-ID: 1594800823.686.1492529580693.JavaMail.zimbra () thebaacks ! com
[Download RAW message or body]

> ----- Original Message -----
> From: "Phil Thompson" <phil@riverbankcomputing.com>
> To: "Jim Baack" <jbaack@accelerantsys.com>
> Cc: pyqt@riverbankcomputing.com
> Sent: Tuesday, April 18, 2017 12:53:09 AM
> Subject: Re: [PyQt] Basic QQmlComponent question

> On 18 Apr 2017, at 5:35 am, Jim Baack <jbaack@accelerantsys.com> wrote:
> > 
> > I am new to PyQt - enjoying it so far but have a lot to learn.
> > 
> > I was expecting the code below to print the type as "QGridLayout" but it is \
> > instead "QObject". Am I doing something wrong here or is my expectation \
> > incorrect? I appreciate the help.
> 
> A QML GridLayout is completely unrelated (except they perform a similar function) \
> to a widget based QGridLayout. 
> QML UI's and widget UI's are completely separate UI implementations - they are not \
> different interfaces to the same UI implementation. 
> Phil

Phil-

Appreciate the quick response. I think the docs here \
http://doc.qt.io/qt-5/qtqml-cppintegration-interactqmlfromcpp.html led me astray \
because the section "Loading QML Objects from C++" describes casting the object \
created from the component to its actual C++ type. It sounds like that cannot be done \
in the case of GridLayout.

My goal was to load the layout and various Quick 2 widgets from QML as components, \
then add widgets as determined at runtime to the layout dynamically. I will think \
about another way to accomplish this. Thanks.


Jim 
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic