Registered Member
|
Hello,
I've been away from KDE since 2003. But now I'm back and want to develop a few wallpaper plugins. I compiled the first wallpaper tutorial OK and had it running on my desktop. However I'm having trouble compiling the second tutorial. I have looked through every file very carefully and tried adjusting a few things to fix these errors.
There are a couple of functions that don't give the "‘config’ was not declared in this scope" error that have the kconfig declaration. I have tried putting this in createConfigurationInterface function but it makes no difference. Here are the other files. config.ui CMakeLists.txt tutorial.h tutorial.cpp What am I doing wrong ? I'm 99% sure I've followed the tutorial to the letter. |
Administrator
|
The problem here is that your *.ui file is not included in the Tutorial class, and isn't loaded into the tutorial.h file.
To do this, edit tutorial.h: Add to the top:
And to your private variables:
Then edit tutorial.cpp, and change all references to config.* to configWidget.* in Tutorial::createConfigurationInterface. Leave the other functions unchanged, they are fine.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Thanks. That compiles now. I wonder if the tutorial needs adjusting ? I guess it might have been left like that to make the pupil think a bit.
|
Administrator
|
The tutorial may need adjusting, yes. As Techbase is a wiki, please feel free to work on and improve the tutorials as you go through them.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
I added a link to this thread in the tutorial.
|
Registered Member
|
Is it possibly to use OpenGL?
If you have to use the Plasma::Wallpaper Ocean::Ocean(QObject *parent, const QVariantList &args) : Plasma::Wallpaper(parent, args) How can I create QGLWidget? Ocean::Ocean(QWidget *parent) : QGLWidget(QGLFormat(QGL::SampleBuffers), parent) |
Administrator
|
Unfortunately Plasma::Wallpaper provides you with very limited access - and this excludes use of OpenGL as you are required to use QPainter to paint the Wallpaper. You might want to ask on the Plasma Development mailing list (plasma-devel@kde.org) though.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot]