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

[SOLVED] The easiest plasma PopupApplet problem

Tags: None
(comma "," separated)
cinas
Registered Member
Posts
21
Karma
0
Can anyone tell me what's wrong with such easy code? The label isn't shown. Thanks for help.

Code: Select all
#include "plasma-xxx.h"

xxx::xxx(QObject *parent, const QVariantList &args) : Plasma::PopupApplet(parent, args)
{
    m_pLabel = new Plasma::Label;
    m_pLabel->setText("Hello");
    m_pLayout = new QGraphicsLinearLayout(Qt::Vertical);
    m_pLayout->addItem(m_pLabel);
    m_pWidget = new QGraphicsWidget;
    m_pWidget->setLayout(m_pLayout);
}

xxx::~xxx()
{
}

QGraphicsWidget* xxx::graphicsWidget()
{
    return m_pWidget;
}

#include "plasma-xxx.moc"
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
You may need to set the popup icon.
PopupApplet::setPopupIcon( QIcon )


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
cinas
Registered Member
Posts
21
Karma
0
It works :-D Thanks so much !


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]