TTkUiLoader🌶️

class TTkUiLoader[source]🌶️

Bases: object

Initialize self. See help(type(self)) for accurate signature.

Methods🌶️

static loadDict(ui, baseWidget: TTkWidget = None, kwargs=None) TTkWidget[source]🌶️

load the dictionary representing the ui definition of the widget

Parameters:
  • ui (dictionary generated by ttkDesigner) – the representation of the widget

  • baseWidget (TTkWidget, optional) – the custom widget that will be extended with this ui definition, if not defined a new TTkWidget will be returned,defaults to None

  • kwargs (dictionary, optional) – the custom initialization args,defaults to None

Returns:

TTkWidget

static loadFile(filePath, baseWidget: TTkWidget = None, kwargs=None) TTkWidget[source]🌶️

load the file generated by ttkDesigner

Parameters:
  • filePath (str) – the file path

  • baseWidget (TTkWidget, optional) – the custom widget that will be extended with this ui definition, if not defined a new TTkWidget will be returned,defaults to None

  • kwargs (dictionary, optional) – the custom initialization args,defaults to None

Returns:

TTkWidget

static loadJson(text, baseWidget: TTkWidget = None, kwargs=None) TTkWidget[source]🌶️

load the json representing the ui definition of the widget

Parameters:
  • text (json generated by ttkDesigner) – the representation of the widget in Json format

  • baseWidget (TTkWidget, optional) – the custom widget that will be extended with this ui definition, if not defined a new TTkWidget will be returned,defaults to None

  • kwargs (dictionary, optional) – the custom initialization args,defaults to None

Returns:

TTkWidget

static normalise(ui)[source]🌶️