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

Plasma List Containment?

Tags: None
(comma "," separated)
Daniel_Boff
Registered Member
Posts
82
Karma
0

Plasma List Containment?

Sun Aug 07, 2011 12:01 pm
Hi guys,

I'm writing a plasmoid to show airdates of arbitary tv-shows. The main functionality is there, but I'm having trouble with the representation of the data yet.
Let me show you a screenshot of the plasmoid:Image

Currently the GUI is setup in this way:
there's a Plasma.ScrollWidget which has a QGraphicsGridLayout as a widget. The images are represented with a Plasma.Label as well as the showinfos. The buttons to remove a show are Plasma.PushButtons.
These Plasma.Pushbuttons and Plasma.Labels correspond to cells of the GraphicsGridLayout.

This is obviously not a good way to represent data (using a gridlayout), but a couldn't find a nice container for my data. Is there anything like a plasmathemed listview or tableview, which I can use?

If there's no other widget I can use I need a way to delete rows from an graphicsgridview, right now when I press the button to remove a show the graphicsgridview will not shrink: there will be an empty space.

I hope you have any suggestions,

Cheers,
Daniel
User avatar
dpalacio
Registered Member
Posts
240
Karma
2
OS

Re: Plasma List Containment?

Sun Aug 07, 2011 4:30 pm
You do not say in which language you are coding in the widget. It seems to be Javascript. If that is the case then, no, there is no ListView available. But there is a ListView for the QML language widgets.


connect(post, SIGNAL(readSignature()), qapp, SLOT(quit()));
Daniel_Boff
Registered Member
Posts
82
Karma
0

Re: Plasma List Containment?

Sun Aug 07, 2011 6:01 pm
oh I forgot, I'm programming in python
User avatar
dpalacio
Registered Member
Posts
240
Karma
2
OS

Re: Plasma List Containment?

Mon Aug 08, 2011 3:27 am
For Python (and any other Qt binding) you can use Qt's view classes. The downside is that raw Qt widgets are not drawn with the Plasma style. There is no generic Plasma listview.

I will say it gain, QML does what you want more easily than Qt's Model/View widgets. It is also the recommended Plasma way of widgets.


connect(post, SIGNAL(readSignature()), qapp, SLOT(quit()));


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot]