Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- self.iface.actionPanToSelected().trigger()
- from PyQt4.QtGui import QToolBar
- for x in iface.mainWindow().findChildren(QToolBar):
- # x.objectName() returns the names of the toolbars
- if x.objectName() == 'Example':
- print x.children()
- [<PyQt4.QtGui.QLayout object at 0x0000000023589840>, <PyQt4.QtGui.QToolButton object at 0x0000000024DCE488>, <PyQt4.QtGui.QAction object at 0x0000000024DCE510>,
- <PyQt4.QtGui.QToolButton object at 0x0000000024DCE598>, <PyQt4.QtGui.QToolButton object at 0x0000000024DCE620>]
- self.actionCopy = QAction( icon, u"Copy selected layers and groups to clipboard (Ctrl+Ins)", self.iface.mainWindow() )
- self.actionCopy.setObjectName('mActionCopyLayersToClipboard')
- from PyQt4.QtGui import QAction
- iface.mainWindow().findChild( QAction, 'mActionCopyLayersToClipboard' ).trigger()
Add Comment
Please, Sign In to add comment