On 25/11/2010, at 7:25 AM, ext Charley Bay wrote:
> This does raise the next question (or two):
>
> (1) The QML implies an "instantiation tree" of items in a parent-child
> relationship. That's great, and part of what makes QML so easy to use. Is
> this tree "special" in any way? For example,
Ummm... sorry to add confusion, but it is possible (seems likely to me) that
I observed an "order of operations on initialization" problem ...
I've re-structured my code, and now *both* the boundingRect() and
width/height properties work properly.
In the previous implementation, I had "instanti
Girish spaketh:
> boundingRect() works as I would expect. Can you provide some sample code?
> QDeclarativeItem::boundingRect()>
>
Was your C++ code inside an application-derived
QDeclarativeItem::itemChange()?
I'm Qt4.7.0, Win7-64bit, MSVC++2008.
I tried it again to make sure there was no dif
Hi,
On Thu, Nov 25, 2010 at 2:55 AM, Charley Bay wrote:
> I confirmed that these *do not* work for me:
>
> ...with a "Text { width: 50; height: 20 }" on the QML side,
>
> QGraphicsItem::boundingRect() // ALWAYS RETURNS QRectF(0,0,-1,-1)
> QGraphicsItem::opaqueArea().boundingRect() // ALWAYS RETUR
Ok, update, I couldn't wait to try this out (results below):
charley spaketh:
>>
>> > Related question: Now that I'm in the QGraphicsItem world, which is
>> *not* a
>> > QObject with properties, how does QML expose attributes (since those are
>> > *all* properties based)?
>>
>
> Giresh respondeth
>
> charley spaketh:
> > Related question: Now that I'm in the QGraphicsItem world, which is
> *not* a
> > QObject with properties, how does QML expose attributes (since those are
> > *all* properties based)?
>
Giresh respondeth:
> QML works with properties exposed through the metaobject system
Hi Charley,
On Wed, Nov 24, 2010 at 7:42 PM, Charley Bay wrote:
>
>
> Martin spaketh:
>>
>> QGraphicsItem::itemChange() may do what you want:
>>
>>
>>
>> http://doc.qt.nokia.com/4.7-snapshot/qgraphicsitem.html#itemChange
>
> Works great! Thanks!
>
> Related question: Now that I'm in the QGraph
Martin spaketh:
> QGraphicsItem::itemChange() may do what you want:
>
>
>
> http://doc.qt.nokia.com/4.7-snapshot/qgraphicsitem.html#itemChange
>
Works great! Thanks!
Related question: Now that I'm in the QGraphicsItem world, which is *not* a
QObject with properties, how does QML expose attr
Subject: [Qt-qml] C++ MyClass to detect child added/removed from QML
I'm sure the answer is simple, but I can't find it: I want my C++ implemented
QML object to be notified when children are added:
//FILE: MyFile.qml
import Qt 4.7
import MyCppClass 1.0
Rectangle {
MyCppClas
I'm sure the answer is simple, but I can't find it: I want my C++
implemented QML object to be notified when children are added:
//FILE: MyFile.qml
import Qt 4.7
import MyCppClass 1.0
Rectangle {
MyCppClass {
id: myCppClass
Text { text: "some text" } // CHILD NOT DETECTED AS ADDED
10 matches
Mail list logo