[RQt-devel] qtgui obsolete forever?

Michael Lawrence lawrence.michael at gene.com
Wed Aug 4 21:51:49 CEST 2010


I will fix up the vignette so that it runs. I've never tried to run that
code; it's more of a sketch :)

Also, to answer Marie's question, QLayout is for laying out widgets, e.g.,
views, while QGraphicsLayout is for laying out QGraphicsItems, e.g., layers.
For simple plots, there's only one grid used (with multiply stacked layers)
per view. In general, this is obviously not true. One could have multiple
plots within the same figure, for example. Or there could be more than one
view for a single figure (i.e. scene).

I'm getting the feeling that this stuff is not immediately obvious to
everyone. Lots of documentation to write.... sorry about that.

Michael

On Wed, Aug 4, 2010 at 8:10 AM, Yihui Xie <xie at yihui.name> wrote:

> The R code chunks in the layout section of the qtpaint vignette cannot
> run, and they are marked with 'eval=FALSE':
>
> <<layout-layers,eval=FALSE>>=
> scene <- qgraphicsScene()
> figLayer <- qlayer(scene)
> titleLayer <- qlayer(figLayer, titlePainter, rowSpan = 2)
> yaxis <- qlayer(figLayer, yAxisPainter, row = 1)
> plotLayer <- qlayer(figLayer, plotPainter, row = 1, col = 1)
> xaxis <- qlayer(figLayer, xAxisPainter, row = 2, col = 1)
> @
>
>
> <<layout-preferred-dims,eval=FALSE>>=
> layout <- figLayer$layout()
> layout$setRowPreferredHeight(0, 75)
> layout$setRowPreferredHeight(1, 400)
> layout$setRowPreferredHeight(2, 75)
> layout$setColumnPreferredWidth(0, 75)
> layout$setColumnPreferredWidth(1, 600)
> @
>
>
> <<layout-stretch-factor,eval=FALSE>>=
> layout$setRowStretchFactor(0, 0)
> layout$setRowStretchFactor(2, 0)
> layout$setColumnStretchFactor(0, 0)
> @
>
> For example,
>
> > library(qtpaint)
> > scene <- qgraphicsScene()
> Error: could not find function "qgraphicsScene"
>
> Even if I correct it with qscene(), there are still errors following,
> e.g. 'layout' does not have a child named 'setRowPreferredHeight'.
>
> > sessionInfo()
> R version 2.11.1 (2010-05-31)
> x86_64-pc-linux-gnu
>
> locale:
> [1] en_US.utf8
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] qtpaint_0.7.8 qtbase_0.7-1
>
> loaded via a namespace (and not attached):
> [1] tools_2.11.1
>
>
>
> Regards,
> Yihui
> --
> Yihui Xie <xieyihui at gmail.com>
> Phone: 515-294-6609 Web: http://yihui.name
> Department of Statistics, Iowa State University
> 3211 Snedecor Hall, Ames, IA
>
>
>
> On Wed, Aug 4, 2010 at 8:38 AM, Michael Lawrence
> <lawrence.michael at gene.com> wrote:
> > The vignette probably needs to be fixed. The addressBook.R demo does use
> a
> > grid layout, but the syntax will need to be adjusted for QGraphicsView
> > framework.
> >
> > It would be helpful if you could paste the code that does not work, along
> > with the error (or screenshot).
> >
> > Btw, Deepayan, I'm giving the talk on qtpaint/qtbase stuff at JSM today.
> > Wish you could have made it.
> >
> > Thanks,
> > Michael
> >
> _______________________________________________
> Qtinterfaces-devel mailing list
> Qtinterfaces-devel at lists.r-forge.r-project.org
>
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/qtinterfaces-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/qtinterfaces-devel/attachments/20100804/66be7c3f/attachment.htm>


More information about the Qtinterfaces-devel mailing list