Dear All,<br><br>I am trying to create THIRD LEVEL MENU through the following code. Like I have a menu Called "Boundaries", inside that I have sub menu called "Division", inside that I have "Division_name", inside "Division Name" we have a separate sub menu called "Division Range", on clicking on the sub menu "Division range" some action is done, like opening the range boundary shape file. I am able to open the Shape file portion, but I am getting error in the Bold Line marked as "AttributeError: addActions"<br>
<br> self.menu = QMenu()<br> self.menu.setTitle( "Boundaries" )<br> <br> self.DM = QMenu( "Division" )<br> self.Div1 = QAction( QIcon( ":/icons/find.png" ), "Division Name",self.iface.getMainWindow() )<br>
self.DM.addActions( [ self.Div1])<br> self.menu.addMenu( self.DM )<br> menuBar = self.iface.getMainWindow().menuBar()<br> menuBar.addMenu(self.menu)<br> <br> self.Div_Range = QAction( QIcon( ":/icons/find.png" ), "Division Range",self.iface.getMainWindow() )<br>
<b>self.Div1.addActions( [ self.Div_Range])</b><br> self.menu.addMenu( self.Div_Range )<br> menuBar = self.iface.getMainWindow().menuBar()<br> menuBar.addMenu(self.menu)<br> <br> QObject.connect( self.Div_Range, SIGNAL("triggered()"), self.Div1_Clicked )<br>
<br>It will be of immense help, if anybody can point the error in the code, or is it like THIRD LEVEL SUBMENU is not supported in QGIS?<br><br>I am using QGIS 0.11, Python 2.5 and QT.<br><br>I am posting the same in the QGIS Developer forum<br>
<br>Thanking you in advance,<br><br>With Warm Regards<br><br>