Jump to content

Special:Badtitle/NS90:Talk:KDE System Administration/PlasmaDesktopScripting/Writing an example for setting widget's geometry

From KDE TechBase
Revision as of 05:33, 21 August 2012 by Franklin (talk | contribs) (New thread: Writing an example for setting widget's geometry)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

1. In the widget attribute "geometry", we should add an example about how to set up the geometry of a widget. It spent me quite some time trying

  widget.writeConfig("geometry", "x,y,w,h")

and

  widget.geometry = new QRectF(x,y,w,h)

which both were found by google, but both failed. Finally Aaron told me to use this way:

 widget.geometry = QRectF(x, y, w, h)

and it worked. So I suggest to put this in the page.