How to place dropdown menus in a QToolBar?

Task: place the drop down menu.
There is a QMenuBar, and it is clear to him: I declare him, attached to him QMenu, to the QAction and drop down menu ready.
There is a QToolBar, and it's not clear at all. QAction strengthen learned, and menu no. Opened the documentation carefully and tried to understand — the whole day was spent on it. To no avail.
Here is the code:
toolBar = QToolBar() #Ubavlyaem toolbar
self.addToolBar(toolBar) #Fasten it to the window

Button=QToolButton(self) #Declare a button that should contain a drop-down menu
Button.setIcon(QIcon(self.style().standardIcon(QStyle.SP_TitleBarMaxButton))) #give it an icon

settingsMenu=QMenu()#Create the menu that will appear
action1 = settingsMenu.addAction("Item 1") #Add item меню1
settingsMenu.addSeparator() #a Separator, to make it prettier :)
action2= settingsMenu.addAction("Пункт2")#Add item меню2
action3= settingsMenu.addAction("Item 3")#Add item меню3

Button.setMenu(settingsMenu) #Touches to the menu button
Button.setPopupMode(QToolButton.MenuButtonPopup) #Set mod for otobrany menu when you click

self.settingsButton = toolBar.addWidget(Button)#Add the resulting widget вToolBar


And all would be well, but in the end I just get absolutely beautiful button that shows absolutely nothing.
spoiler
5e98cea4327f3166192400.png

I think I spent the whole day walking around, but still can not extract the couple of lines that "do everything well".
Please help: how to declare drop down menu in a QToolBar? :(
April 19th 20 at 12:26
1 answer
April 19th 20 at 12:28
Solution
In desperation have just cecala everything links and some absolutely incredible way moved here.

In what salt: you need to declare the parent of the menu, namely the button.
In my case it is:
settingsMenu=QMenu(Button)

Find more questions by tags PySidePython