Talk:Development/Tutorials/Plasma4/GettingStarted: Difference between revisions

From KDE TechBase
(suggestion)
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Messy, unsorted comments, posted without a proper title==
I noticed that to successfully install the plasmoid the kdelibs5-dev package is required. Otherwise CMake throws an error and doesn't compile source code.
I noticed that to successfully install the plasmoid the kdelibs5-dev package is required. Otherwise CMake throws an error and doesn't compile source code.
[[User:Jakub|Jakub]] 15:56, 27 April 2009 (UTC)
[[User:Jakub|Jakub]] 15:56, 27 April 2009 (UTC)
Line 17: Line 18:


----
----
Everything works except the install, which puts the results in /usr/local.  KDE does not search those directories.  A small section on how to modify the cmake input file appropriately would be appreciated.
== QRectF boundingRect() ==
=== Original content ===
''Below is the content that was removed from the main article. See discussion underneath that.''
==== QRectF boundingRect() ====
The <tt>boundingRect()</tt> function tells plasma the actual size of the plasmoid. This is important because we need to know how much space is taken on the screen.
{{tip|
If you have issues with your plasmoid leaving pixels behind when dragging, this is usually a result of an incorrect boundingRect()
}}
=== Discussion ===


There are some infos about a QRectF boundingRect() method, but no such method defined in the actual code, is that normal ?
There are some infos about a QRectF boundingRect() method, but no such method defined in the actual code, is that normal ?


maybe setContentSize would be better than resize there... [[User:Chani|Chani]] 15:44, 11 February 2008 (CET)
maybe setContentSize would be better than resize there... [[User:Chani|Chani]] 15:44, 11 February 2008 (CET)
:I was wondering the same thing. I just posted the question in the kde-devel mailing list. [[User:Augustin|Augustin]] 07:20, 3 March 2011 (UTC)


----
: Reply I got from Sebastian Kügler: "It's defined in [http://doc.qt.nokia.com/latest/qgraphicswidget.html#boundingRect QGraphicsWidget]; boundingRect() is inherited by [http://api.kde.org/4.x-api/kdelibs-apidocs/plasma/html/classPlasma_1_1Applet.html Plasma::Applet]." Thanks for the references. I am removing the reference from the main article, as it is confusing as such, the example code does not refer to it. It does not seem to belong to a tutorial aimed at very beginners. [[User:Augustin|Augustin]] 03:39, 7 March 2011 (UTC)


Everything works except the install, which puts the results in /usr/local.  KDE does not search those directories. A small section on how to modify the cmake insput file appropriately would be appreciated.
== Improve the wiki as you learn ==
See: [[User:Augustin/Improve_the_wiki_as_your_learn|Improve the wiki as you learn]]. Comment there for the policy in general. [[User:Augustin|Augustin]] 07:13, 3 March 2011 (UTC)

Revision as of 03:42, 7 March 2011

Messy, unsorted comments, posted without a proper title

I noticed that to successfully install the plasmoid the kdelibs5-dev package is required. Otherwise CMake throws an error and doesn't compile source code. Jakub 15:56, 27 April 2009 (UTC)


Maybe I have messed something up, but for me copying applet's shared object file (.so) to $KDEDIR/lib will not work (plasma gives: "Could not find requested component: applet_name"). If I copy same file to $KDEDIR/lib/kde4 plasma will find that.


In the "The .desktop file" section, the X-KDE-ServiceTypes=Plasma/Applet is right? Because, if you look at the source code of the default widgets of KDE4.1 you see: ServiceTypes=Plasma/Applet I will edit the page to conform this.

--Leokolln 00:28, 26 September 2008 (CEST)


Everything works except the install, which puts the results in /usr/local. KDE does not search those directories. A small section on how to modify the cmake input file appropriately would be appreciated.

QRectF boundingRect()

Original content

Below is the content that was removed from the main article. See discussion underneath that.

QRectF boundingRect()

The boundingRect() function tells plasma the actual size of the plasmoid. This is important because we need to know how much space is taken on the screen.

Tip
If you have issues with your plasmoid leaving pixels behind when dragging, this is usually a result of an incorrect boundingRect()


Discussion

There are some infos about a QRectF boundingRect() method, but no such method defined in the actual code, is that normal ?

maybe setContentSize would be better than resize there... Chani 15:44, 11 February 2008 (CET)

I was wondering the same thing. I just posted the question in the kde-devel mailing list. Augustin 07:20, 3 March 2011 (UTC)
Reply I got from Sebastian Kügler: "It's defined in QGraphicsWidget; boundingRect() is inherited by Plasma::Applet." Thanks for the references. I am removing the reference from the main article, as it is confusing as such, the example code does not refer to it. It does not seem to belong to a tutorial aimed at very beginners. Augustin 03:39, 7 March 2011 (UTC)

Improve the wiki as you learn

See: Improve the wiki as you learn. Comment there for the policy in general. Augustin 07:13, 3 March 2011 (UTC)