class AnnotationWindow(QtGui.QWidget): def __init__(self, player, parent=None): QtGui.QWidget.__init__(self, parent) self.ui = Ui_Annotation() self.ui.setupUi(self) self.img = None def show_ann(self, header, content): html = "<table width='100%' border='1' cellspacing='0' cellpadding='4'>" for i,h in enumerate(header): if i < len(content): html += "<tr><td>"+h+"</td><td>"+content[i]+"</td></tr>" html += "</table>" self.ui.webView.setHtml(html)
def __init__(self, player, parent=None): QtGui.QWidget.__init__(self, parent) self.ui = Ui_Annotation() self.ui.setupUi(self) self.img = None