Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
gdev001
Posts: 163
Registered: ‎01-30-2013
My Device: Blackberry 10 Simulator

set width and height of object in QML

Hi,

 

I am trying to set height and width of any component in QML to some specific value.

What is the way to do it?

 

I know you can set minimum and maximum height and widths.

And also preferred ones.

But is there no way to set a specific height and width?

 

(of course you could do it with setting maximum and minimum value to same value (e.g., maxHeight=100, minHeight=100), but I was wondeding

if there is a direct way to do it). thanks.

Developer
zezke
Posts: 1,004
Registered: ‎12-12-2010
My Device: Z10 (red Limited Edition)

Re: set width and height of object in QML

What if you just use the width and height properties?

-------------------------------------------
BlackBerry Certified Builder for Native Application Development -- Proud member of the Belgian BlackBerry Developer group
Samples: Park in Ghent
Feeling generous? Nominate me for BB Elite member!
Developer
gdev001
Posts: 163
Registered: ‎01-30-2013
My Device: Blackberry 10 Simulator

Re: set width and height of object in QML

I think it's not possible, you can just either use maximum and minimum width properties or "preferred"
Developer
Developer
klz
Posts: 132
Registered: ‎08-24-2011
My Device: Z10 LE + Playbook

Re: set width and height of object in QML

set the same value for max, min and preffered. 

Thank you!
----------------------------
My Apps: Alchemy Game | Image Resizer | Jam! | Traffic Signs: USA | Radio Record
My Blog: http://bb10pro.com
New Contributor
MacLuky
Posts: 7
Registered: ‎02-11-2013
My Device: Z10

Re: set width and height of object in QML

But do test for both the Z10 and Q10, since you're basically cicumventing the layoutmanager