How to place a button in the bottom left corner?

I am developing custom function and want to place the button in the bottom left corner.
Is it possible?

You should be able to do this using viewer.add_dock_widget, see signature here. You can use area='left' to place it on the left side of the viewer.

For an easy way to make a widget to add, you might want to look at magicgui.

I hope this helps!

1 Like

the exact area that you’re highlighting there is reserved for the layer list, so you can’t put anything there. The following code (@jni’s suggestion) will result in a button just below the bottom left buttons:

import napari
from qtpy.QtWidgets import QPushButton

viewer = napari.Viewer()
viewer.window.add_dock_widget(QPushButton('Push Button'), area='left')

1 Like

Thank you @jni @talley !
I think I understand the situation.
It worked well!