Hi, I must say I was a bit disappointed reading the answer that we would have to live with our ImplicitSizeItem. I'm still in the learning process of QML development, and thus cannot really come up with any better solutions just like that. However, one thing came to my mind; could it be something "private" ie. prefixed with "__" and that way "internally" exposed for Qt Components' usage?
-- J-P Nurmi >-----Original Message----- >From: qt-components-bounces+jari-pekka.nurmi=nokia....@qt.nokia.com >[mailto:qt-components-bounces+jari-pekka.nurmi=nokia....@qt.nokia.com] >On Behalf Of Malmqvist Mathias (Nokia-MS/London) >Sent: 14. tammikuuta 2011 1:11 >To: artur.so...@openbossa.org >Cc: qt-components@qt.nokia.com; Jones Martin (Nokia-MS-Qt/Brisbane) >Subject: Re: [Qt-components] (QTBUG-14957) Only core QML elements can >have implicit size > >Hi Artur, > >I agree having a function for binding an expression to the implicit size >properties is not ideal. But if making them writable is not an option, >and >no one can suggest a better alternative, then something like that I >think >would be an acceptable compromise, over having to use an >ImplicitSizeItem >that makes those properties writable anyway. > >Think about it; what's the point of making the implicitWidth and >implicitHeight >read-only on Item, if all of our QtComponents elements that need an >implicit >size makes them writable anyway? That said, I agree with Marin that they >shouldn't be writable (because they're not a way to influence what the >Item >does). So having a function (for example) to bind an expression to them >with >a big label on it explaining that it does and what it's for, would be >better than >the alternative, I think. > >Martin, would making them writable on Item but read-only on all the core >elements you provide be a better compromise? Probably not... > > >Cheers >Mathias >__________________ >From: ext Artur Souza (MoRpHeUz) [artur.so...@openbossa.org] >Sent: Thursday, January 13, 2011 8:20 PM >To: Malmqvist Mathias (Nokia-MS/London) >Cc: qt-components@qt.nokia.com; Jones Martin (Nokia-MS-Qt/Brisbane) >Subject: Re: [Qt-components] (QTBUG-14957) Only core QML elements can >have implicit size > >Hi Mathias! > >On Thu, Jan 13, 2011 at 2:38 PM, <mathias.malmqv...@nokia.com> wrote: >> J-P and Marco (and anyone else who cares about implicit sizing of >Items), >> what do you think about Marin's suggested fix for QTBUG-14957? >> >> Basically Martin wants to support implicitWidth and implicitHeight >properties >> on Item, but they would be read-only so we would still need to have an >> ImplicitSizeItem base element for our components that really only >overrides >> the read-only Item properties and make them writable. >> >> I can see why Martin doesn't want to make these properties writable >(because >> they shouldn't be), but if we still need our own ImplicitSizeItem and >all it does >> is make these properties writable, then it doesn't really improve much >on what >> we already have. >> >> What do you think? >> Could we have implicitWidth and implicitHeight properties read-only >but also >> e.g. a function on Item for binding an expression to them? Would that >be a >> balanced compromise? > >These days I had a chat with some co-workers saying that as the time >go I fell more and more that we'll need *some kind* of size hint (it >doesn't necessary need to be exactly the one that we have on >QWidget/QGraphicsWidget). > >So I really support the idea of solving this once for all in QML >itself. Making the properties read-only doesn't improve much our use >case as we still would need our ImplicitSizeItem as you said. > >Enabling the use of a function for binding an expression to them >sounds like a little bit "hackish" from my "API point of view". It >should either support writing on it or not at all, otherwise it just >makes the API uglier and hard to understand when looking from outside. > >Cheers, > >-- >------------------------------------------------------- >Artur Duque de Souza >openBossa >INdT - Instituto Nokia de Tecnologia >------------------------------------------------------- >Blog: http://blog.morpheuz.cc >PGP: 0xDBEEAAC3 @ wwwkeys.pgp.net >------------------------------------------------------- >_______________________________________________ >Qt-components mailing list >Qt-components@qt.nokia.com >http://lists.qt.nokia.com/mailman/listinfo/qt-components _______________________________________________ Qt-components mailing list Qt-components@qt.nokia.com http://lists.qt.nokia.com/mailman/listinfo/qt-components