154 |
154 |
155 @param pos position the context menu shall be shown (QPoint) |
155 @param pos position the context menu shall be shown (QPoint) |
156 """ |
156 """ |
157 act = self.actionAt(pos) |
157 act = self.actionAt(pos) |
158 |
158 |
159 if act is not None and \ |
159 if ( |
160 act.menu() is None and \ |
160 act is not None and |
161 self.index(act).isValid(): |
161 act.menu() is None and |
|
162 self.index(act).isValid() |
|
163 ): |
162 menu = QMenu() |
164 menu = QMenu() |
163 v = act.data() |
165 v = act.data() |
164 |
166 |
165 act2 = menu.addAction(self.tr("Open")) |
167 act2 = menu.addAction(self.tr("Open")) |
166 act2.setData(v) |
168 act2.setData(v) |