Fit Grid elements in Item
Sebastian Kügler
sebas at kde.org
Tue Sep 25 10:49:17 UTC 2012
On Monday, September 24, 2012 22:06:00 Luiz Romário Santana Rios wrote:
> This works nicely. Thank you all very much for the help.
>
> But here's another question: How do I set a different size for the "0"
> and "=" buttons? Repeater doesn't let me set a property differently
> based on the index and, even if I try to put each button manually, the
> grid layout gets screwed up. Even if I try to put, for instance, the
> "0" button outside the grid, it will make the whole column above it
> wider.
width: modelData == "0" ? 40 : 20
in your delegate could do that.
That also means you'll have to change the size of adjacent items, though.
--
sebas
http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9
More information about the Plasma-devel
mailing list