can't get qgraphicsgridlayout to resize properly

Amritpal Bath amrit at transamrit.net
Tue Aug 25 03:58:11 CEST 2009


I've got a Plasma::Applet containing a QGraphicsGridLayout, which has a couple 
of QGraphicsWidgets (QLabels via QGraphicsProxyWidget).

The text in my layout gets updated periodically after running an external 
process, but I can't quite get the resizing to work properly.  I've attached a 
similar example, with a layout containing two QPushButtons.

I try to adjust the height of the buttons, layout, AND the Applet, but nothing 
I've tried will make the buttons taller.  It sounds like maybe I'm missing 
something about QSizePolicy, but I'm not sure.

Can someone please explain the relationship between Plasma::Applet and 
QLayout, and why the attached code does not make the buttons taller?  As you 
can see from the .cpp, I've tried most/all things I could find.

Thanks!



-- 
Amrit
ICQ: 3173735
AIM: ThatComputerGuy
http://transamrit.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: resizeplasmoid.cpp
Type: text/x-c++src
Size: 1669 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20090824/10d511ed/attachment-0001.cpp 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: resizeplasmoid.h
Type: text/x-chdr
Size: 537 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20090824/10d511ed/attachment-0001.h 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: resizeplasmoid.desktop
Type: application/x-desktop
Size: 293 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20090824/10d511ed/attachment-0001.desktop 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CMakeLists.txt
Type: text/x-cmake
Size: 595 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20090824/10d511ed/attachment-0001.bin 


More information about the Plasma-devel mailing list