{"id":28016,"library":"orange-widget-base","title":"Orange Widget Base","description":"Base classes for creating Orange Canvas widgets. Provides OWBaseWidget and its derived classes for building interactive data mining components. Current version 4.27.0, requires Python >=3.10. Released as part of the Orange data mining suite.","status":"active","version":"4.27.0","language":"python","source_language":"en","source_url":"https://github.com/biolab/orange-widget-base","tags":["orange","widget","canvas","data-mining","orangedm"],"install":[{"cmd":"pip install orange-widget-base","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"wrong":"from orangewidget.widget import OWBaseWidget","symbol":"OWBaseWidget","correct":"from orangewidget.widget import OWBaseWidget"}],"quickstart":{"code":"from orangewidget.widget import OWBaseWidget, Input, Output\nfrom orangewidget import gui\nfrom orangewidget.settings import Setting\n\nclass MyWidget(OWBaseWidget):\n    name = \"My Widget\"\n    description = \"A custom widget\"\n    icon = \"icons/my.svg\"\n    priority = 10\n\n    class Inputs:\n        data = Input(\"Data\", object, \"set_data\")\n\n    class Outputs:\n        result = Output(\"Result\", object)\n\n    settings = {\"threshold\": Setting(0.5)}\n    want_main_area = False\n\n    def __init__(self):\n        super().__init__()\n        self.threshold = 0.5\n        gui.doubleSpin(self.controlArea, self, \"threshold\", 0, 1, 0.1, label=\"Threshold:\")\n\n    def set_data(self, data):\n        pass\n\nif __name__ == \"__main__\":\n    from orangewidget.utils.widgetpreview import WidgetPreview\n    WidgetPreview(MyWidget).run()","lang":"python","description":"Minimal OWBaseWidget subclass with inputs, outputs, settings, and control area."},"warnings":[{"fix":"Define Inputs and Outputs as inner classes with Input/Output instances.","message":"In version 4.x, the signal handling API changed from connect/disconnect style to decorator-based Input/Output classes. Old code using `self.inputs = [...]` or `self.outputs = [...]` will break.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Use `from orangewidget import gui` instead.","message":"The `gui` module was removed from `Orange.widgets` and moved to the separate `orangewidget` package. Importing from `Orange.widgets.gui` will raise ImportError.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Import from `orangewidget.settings import Setting`.","message":"The `Orange.widgets.settings` module moved to `orangewidget.settings`. The `Setting` class import path changed.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Update widgets to use OWBaseWidget and Input/Output decorators.","message":"The `orange-canvas-core` package now enforces the new widget API. Old-style widgets may not load or cause errors.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Define handler methods with descriptive names and link them via `Input(\"Name\", type, \"method_name\")`.","message":"The use of `getattr(self, 'handler_{}'.format(signal_name))` signal handlers is deprecated in favor of explicit methods linked via `Input` decorator.","severity":"deprecated","affected_versions":">=4.0.0"},{"fix":"Always set `name` to a unique, descriptive string.","message":"The `name` attribute of OWBaseWidget must be a non-empty string, otherwise the widget may not appear in the canvas.","severity":"gotcha","affected_versions":"all"},{"fix":"Pass the class object, e.g., `Input(\"Data\", Orange.data.Table, \"set_data\")`.","message":"Signals types must be actual Python objects (classes), not strings. Using strings for type will raise a TypeError at registration.","severity":"gotcha","affected_versions":">=4.0.0"}],"env_vars":null,"search_vec":"'3.10':28 '4.27.0':25 'base':3,4 'build':18 'canva':9,40 'class':5,16 'compon':22 'creat':7 'current':23 'data':20,35,42 'data-min':41 'deriv':15 'interact':19 'mine':21,36,43 'orang':1,8,34,38 'orangedm':44 'owbasewidget':12 'part':31 'provid':11 'python':27 'releas':29 'requir':26 'suit':37 'version':24 'widget':2,10,39","created_at":"2026-05-09T05:53:17.799653+00:00","updated_at":"2026-05-09T05:53:17.799653+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\n  File \"/tmp/tmp915i8lyj/venv/lib/python3.12/site-packages/orangewidget/widget.py\", line 17, in <module>\n    from AnyQt.QtWidgets import (\n  File \"/tmp/tmp915i8lyj/venv/lib/python3.12/site-packages/AnyQt/QtWidgets.py\", line 3,"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":"http://orange.biolab.si/","github":null,"docs":null,"changelog":null,"pypi":"https://pypi.org/project/orange-widget-base/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["data","web-framework"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}