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

Plasma::Dialog always empty

Tags: None
(comma "," separated)
ThunderGod
Registered Member
Posts
3
Karma
0
OS

Plasma::Dialog always empty

Mon Jan 31, 2011 12:55 am
Hey,

I'm plaing around with plasmoid development and I've got a problem: Whatever I do, my Plasma::Dialogs remain empty, only the size changes.

So, here's a simple test that *should* work, but for some reason it doesn't.

Code: Select all
  aDialog = new Plasma::Dialog();
  aDialog->setGraphicsWidget(new QGraphicsWidget());
  mLayout = new QGraphicsLinearLayout(Qt::Vertical);
  aDialog->graphicsWidget()->setLayout(mLayout);
  mIcon = new Plasma::IconWidget(KIcon("kde"), "kde", aDialog->graphicsWidget());
  mLayout->addItem(mIcon);


Does anyone know what I'm doing wrong?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Plasma::Dialog always empty

Mon Jan 31, 2011 4:40 am
This could be due to the display order (also known as z-order). Try constructing the dialog contents prior to setting the Dialog graphics widget.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
ThunderGod
Registered Member
Posts
3
Karma
0
OS

Re: Plasma::Dialog always empty  Topic is solved

Mon Jan 31, 2011 11:25 am
Already tried that, also with the layout, neither way worked.

Isn't there any example in the techbase? The api docs are great but they don't tell me how to use a thing.

€: Think I found the problem: It works when I initialize the whole thing in the init function instead of in the constructor. (So, it was again my stupidity...)


Bookmarks



Who is online

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