spacr.qt.app
============

.. py:module:: spacr.qt.app

.. autoapi-nested-parse::

   QApplication bootstrap + MainWindow.

   `launch(argv)` is the public entry point called by `spacr-qt` and
   `python -m spacr.qt`.









Module Contents
---------------

.. py:data:: APPS
   :value: [('mask', 'Mask', 'Generate cellpose masks for cells, nuclei and pathogens', 'Core'),...


.. py:class:: Sidebar(parent=None)

   Bases: :py:obj:`PySide6.QtWidgets.QWidget`


   Left navigation column. Emits `nav_selected(str key)` when a tile
   is clicked. `Home` reverts to the startup page.


   .. py:attribute:: nav_selected


.. py:class:: MainWindow(initial_app: Optional[str] = None)

   Bases: :py:obj:`PySide6.QtWidgets.QMainWindow`


   Top-level window: sidebar + stacked screens + status bar.

   :param initial_app: optional app key to navigate to on show; when
       omitted the window opens on the Home startup page.


   .. py:attribute:: DEMO_TARGETS


   .. py:method:: closeEvent(event)

      Cancel every active AI stream + wait for its QThread to exit
      BEFORE Qt starts destroying widgets. Prevents the
      'QThread: Destroyed while thread is still running / Aborted'
      crash on quit.



.. py:function:: launch(argv: Optional[list[str]] = None) -> int

   Bootstrap QApplication and show the main window.


