"""
A :class:`~msl.qt.button.Button` example.
"""
from msl.qt import application, Button


def left():
    print('left click')


def right():
    print('right click')


def item1():
    print('item #1 selected')


def item2():
    print('item #2 selected')


def item3():
    print('item #3 selected')


def item4():
    print('item #4 selected')


def show():
    app = application()
    b = Button(text='My button', icon=32, icon_size=4., left_click=left, tooltip='Example button')
    b.set_right_click(right)
    b.add_menu_item('My item #1', triggered=item1, shortcut='CTRL+I', icon=43)
    b.add_menu_item('My item #2', triggered=item2, icon=47, tooltip='Second')
    b.add_menu_item('My item #3', shortcut='CTRL+Z', icon=46, tooltip='Visible but disabled (triggered not set)')
    b.add_menu_separator()
    b.add_menu_item('My item #4', triggered=item4, tooltip='Fourth')
    b.show()
    app.exec_()


if __name__ == '__main__':
    show()

@@ -518,32 +518,37 @@
 b.add_menu_item(
+text=
 'My item #1', tr
@@ -602,32 +602,37 @@
 b.add_menu_item(
+text=
 'My item #2', tr
@@ -685,32 +685,37 @@
 b.add_menu_item(
+text=
 'My item #3', sh
@@ -819,16 +819,16 @@
 rator()%0A
-
     b.ad
@@ -839,16 +839,21 @@
 nu_item(
+text=
 'My item

add 'text' to satisfy that the method signature requires kwargs