问题
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.
I haven't programmed with QT, but I know C++ well. So, the resources shouldn't be necessarily python apis.
To be specific, I want a layout with two rows, the first containing two columns and the second with 3 rows.
回答1:
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.
For a grid layout you want to use QGraphicsGridLayout. Have a look at the addItem method in particular.
回答2:
Perhaps a good place to start would be the Qt documentation?
来源:https://stackoverflow.com/questions/915633/please-point-me-to-good-documentation-about-qt-layouts-for-plasma-development