collagraph custom QLayout #105
Replies: 2 comments 1 reply
-
I get the feeling that adding |
Beta Was this translation helpful? Give feedback.
-
Currently it is not supported: only the basic QBoxLayout, QGridLayout and QFormLayout are supported through a special An example of that can be seen here: https://github.com/fork-tongue/collagraph/blob/master/examples/layout-example.py We could add an extra if-else statement in the renderer = PySideRenderer()
renderer.register("flow", FlowLayout)
cg.h(
"widget",
{
"layout": {
"type": "flow",
# ... and any other attributes
# that should be applied to the
# layout object
}
},
cg.h(
"Button",
{
"text": "New Project",
},
),
) |
Beta Was this translation helpful? Give feedback.
-
Following up on https://github.com/orgs/fork-tongue/discussions/104
I would like use a custom
QLayout
like https://doc.qt.io/qtforpython-6/examples/example_widgets_layouts_flowlayout.htmlIs there a way to register custom
QLayout
s like we register customQWidget
s?Beta Was this translation helpful? Give feedback.
All reactions