[Panel-devel] Plasma::ProgressBar into a boxLayout
Aaron J. Seigo
aseigo at kde.org
Sat Nov 3 01:40:12 CET 2007
On Friday 02 November 2007, Javier Goday wrote:
> Hello everybody.
> I'm having problems with adding Plasma::ProgressBar's widget into a
> boxLayout, i have done a test with Plasma::PushButtons instead of
> ProgressBars and everything works rigth, this way:
> m_layout->addItem(button);
> m_layout->addItem(button2);
> m_layout->addItem(bar);
btw, these lines are unnecessary. items are always added to their parent's
layouts. this is due to an interesting design decision/flaw in the current
layout classes.
> but with progressbars doesn't works :(
> Plasma::ProgressBar *bar = new Plasma::ProgressBar(this);
>
> Seems that the problem is with the geometry of the progressbar,
> if i change
> the paintWidget method in the
> kdebase/workspace/libs/plasma/widgets/progressbar class
> this line
> --> options.rect = option->rect;
> instead of this one
> --> options.rect = geometry().toRect();
> everything goes right, but really don't know if this change has sense
i believe this change is correct. it should only be painting the exposed area.
--
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
KDE core developer sponsored by Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071102/497b4ef1/attachment.pgp
More information about the Panel-devel
mailing list