Skip to content

Qt Application Setup

qapplication()

emzed_gui.qapplication() -> QApplication

Returns the running QApplication instance, creating one if none exists.

You rarely need to call this directly. All emzed_gui dialog and inspector functions call it internally, so a Qt application is always available when you use the public API.

When you need it

Embedding emzed_gui in a larger Qt application

If your program creates its own QApplication, you do not need to call qapplication()emzed_gui will find the existing instance automatically via QApplication.instance().

Jupyter / IPython

Some Jupyter kernels already manage a Qt event loop (e.g. with %gui qt5). In that case, again, no explicit setup is needed.

If you are using a kernel without a running event loop, call qapplication() once before opening any dialogs:

import emzed_gui

app = emzed_gui.qapplication()  # ensure Qt is ready
emzed_gui.inspect(table)

macOS font loading

On macOS, qapplication() also loads the bundled Inconsolata-Regular font used by the table explorer. This happens automatically the first time any emzed_gui function is called.