def testfunc(): m = Chem.MolFromSmiles('c1ccccc1O') Draw.PrepareMolForDrawing(m) qimg = QImage(250, 200, QImage.Format_RGB32) with QPainter(qimg) as qptr: p = sip.unwrapinstance(qptr) d2d = Draw.MolDraw2DFromQPainter_(250, 200, p, -1, -1) raise ValueError("expected")
def testSIPBasics(self): m = Chem.MolFromSmiles('c1ccccc1O') Draw.PrepareMolForDrawing(m) qimg = QImage(250, 200, QImage.Format_RGB32) with QPainter(qimg) as qptr: p = sip.unwrapinstance(qptr) d2d = Draw.MolDraw2DFromQPainter_(250, 200, p) d2d.DrawMolecule(m) qimg.save("testImageFromPyQt-1.png")