This forum has been archived. All content is frozen. Please use KDE Discuss instead.

spacing between ui components

Tags: None
(comma "," separated)
deadeyes
Registered Member
Posts
34
Karma
0

spacing between ui components

Sat Aug 21, 2010 10:58 am
Hi all,

I created a class that derives from QGraphicsWidget.
In that class I put different UI components (Plasma::IconWidget, Plasma::ToolButton).

These are added to a QGraphicsLinearLayout object.

Now when I use objects from this class I created and put them in a scrollwidget they have to much space in between them.

It looks like the IconWidget (from which I only use text, as it has to be clickable) gives takes more space then necessary. There is only 1 line of text and the space reserved is maybe 3 times the hight of the text itself.

I am searching for a way to get rid of this space-loss.
I tried setContentsMargin and spacing. THis seems to work for ToolButton but not for IconWidget.

Maybe this has also to do with the QGraphicsLinearLayout but I am not sure.

Anyone an idea how I can fix this?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: spacing between ui components

Sat Aug 21, 2010 8:47 pm
If you get no response here, you may wish to try asking on the Plasma Development mailing list ( plasma-devel@kde.org )


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
deadeyes
Registered Member
Posts
34
Karma
0
I fixed this:
Code: Select all
iconWidget->setPreferredHeight(20);


Bookmarks



Who is online

Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]