请向我指出有关等离子开发的QT布局的(好的)文档 [英] Please point me to (good) documentation about QT layouts for plasma development

查看:99
本文介绍了请向我指出有关等离子开发的QT布局的(好的)文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在python中开发等离子体.我在这里有一些不错的教程(techbase.kde.org/Development/Tutorials/Plasma),它们确实很有帮助,但是它们没有有关QT布局及其用法的文档或示例.

I am trying to develop a plasmoid in python. I got some good tutorials here (techbase.kde.org/Development/Tutorials/Plasma) and they are really helpful, but they don't have documentation or examples about QT layouts and their usage.

我还没有使用QT进行编程,但是我非常了解C ++.因此,资源不必一定是python API.

I haven't programmed with QT, but I know C++ well. So, the resources shouldn't be necessarily python apis.

具体来说,我想要一个布局,其中包含两行,第一行包含两列,第二行包含3行.

To be specific, I want a layout with two rows, the first containing two columns and the second with 3 rows.

推荐答案

等离子可作为大型QGraphicsView,而applet是QGraphicsWidget项,这意味着它是

Plasma works as a big QGraphicsView, and applets are QGraphicsWidget items, meaning it's the documentation for QGraphicsLayout that you should be looking at, not QLayout as suggested.

对于网格布局,您想使用 QGraphicsGridLayout .特别查看 addItem 方法.

For a grid layout you want to use QGraphicsGridLayout. Have a look at the addItem method in particular.

这篇关于请向我指出有关等离子开发的QT布局的(好的)文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆