Beispiel #1
0
 def testMenuBar(self):
     self._actionDestroyed = False
     w = QWidget()
     menuBar = QMenuBar(w)
     act = menuBar.addAction("MENU")
     _ref = weakref.ref(act, self.actionDestroyed)
     act = None
     self.assertFalse(self._actionDestroyed)
     menuBar.clear()
     self.assertTrue(self._actionDestroyed)
Beispiel #2
0
 def testMenuBar(self):
     self._actionDestroyed = False
     w = QWidget()
     menuBar = QMenuBar(w)
     act = menuBar.addAction("MENU")
     _ref = weakref.ref(act, self.actionDestroyed)
     act = None
     self.assertFalse(self._actionDestroyed)
     menuBar.clear()
     self.assertTrue(self._actionDestroyed)