[Panel-devel] Plasma::ProgressBar into a boxLayout

Javier Goday jgoday at gmail.com
Fri Nov 2 17:44:45 CET 2007


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 = new Plasma::VBoxLayout(this);
setLayout(m_layout);

Plasma::PushButton *button = new Plasma::PushButton("one button", this);
Plasma::PushButton *button2 = new Plasma::PushButton("another button", this);

m_layout->addItem(button);
m_layout->addItem(button2);

but with progressbars doesn't works :(
Plasma::ProgressBar *bar = new Plasma::ProgressBar(this);
m_layout->addItem(bar);

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

Am i doing something wrong ?
Thanks in advance !
-------------- next part --------------
A non-text attachment was scrubbed...
Name: progressbar.diff
Type: text/x-diff
Size: 522 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071102/a75808ea/attachment.bin 


More information about the Panel-devel mailing list