BuilderListItemFactory#
Superclasses: ListItemFactory, Object
GtkBuilderListItemFactory is a GtkListItemFactory that creates
widgets by instantiating GtkBuilder UI templates.
The templates must extend the class that the parent widget expects.
For example, a factory provided to factory must have
a template that extends ListItem.
Templates typically use GtkExpressions to obtain data from the items
in the model.
Example:
<interface>
  <template class="GtkListItem">
    <property name="child">
      <object class="GtkLabel">
        <property name="xalign">0</property>
        <binding name="label">
          <lookup name="name" type="SettingsKey">
            <lookup name="item">GtkListItem</lookup>
          </lookup>
        </binding>
      </object>
    </property>
  </template>
</interface>
Constructors#
- class BuilderListItemFactory
 - classmethod new_from_bytes(scope: BuilderScope | None, bytes: Bytes) ListItemFactory#
 Creates a new
GtkBuilderListItemFactorythat instantiates widgets usingbytesas the data to pass toGtkBuilder.- Parameters:
 scope – A scope to use when instantiating
bytes – the
GBytescontaining the ui file to instantiate
- classmethod new_from_resource(scope: BuilderScope | None, resource_path: str) ListItemFactory#
 Creates a new
GtkBuilderListItemFactorythat instantiates widgets using data read from the givenresource_pathto pass toGtkBuilder.- Parameters:
 scope – A scope to use when instantiating
resource_path – valid path to a resource that contains the data
Methods#
- class BuilderListItemFactory
 - 
- get_scope() BuilderScope | None#
 Gets the scope used when constructing listitems.