Version: 9.16.0
logview.py
Go to the documentation of this file.
1# Copyright (C) 2006-2026 CEA, EDF
2#
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.
7#
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.
12#
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
16#
17# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18#
19
20import sys
21from qt import *
22
23log="""
24Ligne 1
25Ligne 1
26Ligne 1
27Ligne 1
28Ligne 1
29Ligne 1
30Ligne 1
31Ligne 1
32Ligne 1
33Ligne 1
34Ligne 1
35Ligne 1
36Ligne 1
37"""
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)
55
56
57
58if __name__ == "__main__":
59 a = QApplication(sys.argv)
60 QObject.connect(a,SIGNAL("lastWindowClosed()"),a,SLOT("quit()"))
61 w = LogView()
62 w.text.setText("un texte extremement loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong")
63 a.setMainWidget(w)
64 w.show()
65 a.exec_loop()
def __init__(self, parent=None, name=None, modal=0, fl=0)
Definition: logview.py:39