How to create a dropdown menu in QGIS Toolbar with Python

المشرف العام

Administrator
طاقم الإدارة
I Have a set of some QAction in my QGIS-Plugin and they are created and added to the toolbar like this

icon = QIcon(":/action1.png") self.action1 = QAction(icon, u"Action 1", self.iface.mainWindow()) QObject.connect(self.action1, SIGNAL("triggered()"), self.someMethod) self.iface.addToolBarIcon(self.action1) self.iface.addPluginToMenu(u"&My Plugin", self.action1) But now I'd like to group my Actions like in this "Select Feature" Screenshot:


Is this possible with Python in QGIS?



أكثر...
 
أعلى