On Saturday 08 November 2008 12:05:38 Rob Scheepmaker wrote: > On Saturday 08 November 2008 11:48:54 Sebastian Kügler wrote: > > On Friday 07 November 2008 17:56:11 Rob Scheepmaker wrote: > > > While I was updating the kuiserver applet to use the new progress-bar > > > design I suddenly had the need to obtain the size of a label in the > > > progress-bar svg. JobWidget displays the filename elided > > > ("file://home/...ample.png") and for this to work the width of the > > > label is needed. This patch is pretty straightforward, but I didn't > > > want to add something to public api without approval from other members > > > of the plasma team. > > > > Isn't that what the sizeHint is there for? You should be able to get at > > that with meter->nativeWidget()->sizeHint() then ... > > Sorry, I should have explained it better. It's labelSize(int label). You > should be able to get the size of a specific label. So sizeHint is not > sufficient. Actually, on advice of aseigo, I've changed this to labelRect.
Hm, that's a QLabel (of some sort) inside Plasma::Meter, I might be dense, but you can still easily get at it with sth like myMeter->label->nativeWidget()- >sizeHint() ... Just ignore me if I don't make sense, quite likely :-) -- sebas http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9 _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel