def test_2(self): i = QtWidgets.QGraphicsLineItem() i.line = QtCore.QLineF(1, 2, 3, 4) self.assertEqual(i.line.x1(), 1) self.assertEqual(i.line.y1(), 2) self.assertEqual(i.line.x2(), 3) self.assertEqual(i.line.y2(), 4)
def test_2(self): a = QtWidgets.QAction(None) a.text = "myaction" self.assertEqual(a.text, "myaction") self.trg = 0 a.triggered = self.onTrigger a.trigger() self.assertEqual(self.trg, 17) a.trigger() self.assertEqual(self.trg, 34)
def test_3(self): app = QtWidgets.QApplication(["progname"]) a = QtGui.QAction(None) a.text = "myaction" self.assertEqual(a.text, "myaction") self.trg = 0 a.triggered = self.onTrigger a.trigger() self.assertEqual(self.trg, 17) a.trigger() self.assertEqual(self.trg, 34)
def test_2(self): app = QtWidgets.QApplication(["progname"]) q = QtSvg.QSvgWidget()