1 # Copyright (C) 2006-2019 CEA/DEN, EDF R&D
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
38 class LogView(QDialog):
39 def __init__(self,parent = None,name = None,modal = 0,fl = 0):
40 QDialog.__init__(self,parent,name,modal,fl)
41 layout = QVBoxLayout(self,6,6,"AboutFormLayout")
42 self.text=QTextBrowser(self,"log")
43 self.text.setFrameShape(QTextEdit.NoFrame)
44 self.text.setTextFormat(QTextEdit.PlainText)
45 #self.text.setWordWrap(QTextEdit.FixedColumnWidth)
46 #self.text.setWrapColumnOrWidth(120)
47 self.text.setReadOnly(1)
48 #self.text.setText(log)
49 layout.addWidget(self.text)
50 self.button = QPushButton(self,"pushButton1")
51 self.button.setText("&Close")
52 layout.addWidget(self.button)
53 self.resize(QSize(532,437).expandedTo(self.minimumSizeHint()))
54 self.connect(self.button,SIGNAL("clicked()"),self.accept)
58 if __name__ == "__main__":
59 a = QApplication(sys.argv)
60 QObject.connect(a,SIGNAL("lastWindowClosed()"),a,SLOT("quit()"))
62 w.text.setText("un texte extremement loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong")