101 textEdit->setLineWrapMode(QTextEdit::NoWrap); |
101 textEdit->setLineWrapMode(QTextEdit::NoWrap); |
102 |
102 |
103 closeButton = new QPushButton(tr("&Close")); |
103 closeButton = new QPushButton(tr("&Close")); |
104 connect(closeButton, SIGNAL(clicked()), this, SLOT(close())); |
104 connect(closeButton, SIGNAL(clicked()), this, SLOT(close())); |
105 |
105 |
|
106 showNormalButton = new QPushButton(tr("Show normal")); |
|
107 connect(showNormalButton, SIGNAL(clicked()), this, SLOT(showNormal())); |
|
108 showMaximizedButton = new QPushButton(tr("Show maximized")); |
|
109 connect(showMaximizedButton, SIGNAL(clicked()), this, SLOT(showMaximized())); |
|
110 showFullScreenButton = new QPushButton(tr("Show fullscreen")); |
|
111 connect(showFullScreenButton, SIGNAL(clicked()), this, SLOT(showFullScreen())); |
|
112 |
106 QVBoxLayout *layout = new QVBoxLayout; |
113 QVBoxLayout *layout = new QVBoxLayout; |
107 layout->addWidget(textEdit); |
114 layout->addWidget(textEdit); |
|
115 layout->addWidget(showNormalButton); |
|
116 layout->addWidget(showMaximizedButton); |
|
117 layout->addWidget(showFullScreenButton); |
108 layout->addWidget(closeButton); |
118 layout->addWidget(closeButton); |
109 setLayout(layout); |
119 setLayout(layout); |
110 |
120 |
111 setWindowTitle(tr("Preview <QWidget>")); |
121 setWindowTitle(tr("Preview <QWidget>")); |
112 } |
122 } |
127 textEdit->setLineWrapMode(QTextEdit::NoWrap); |
137 textEdit->setLineWrapMode(QTextEdit::NoWrap); |
128 |
138 |
129 closeButton = new QPushButton(tr("&Close")); |
139 closeButton = new QPushButton(tr("&Close")); |
130 connect(closeButton, SIGNAL(clicked()), this, SLOT(close())); |
140 connect(closeButton, SIGNAL(clicked()), this, SLOT(close())); |
131 |
141 |
|
142 showNormalButton = new QPushButton(tr("Show normal")); |
|
143 connect(showNormalButton, SIGNAL(clicked()), this, SLOT(showNormal())); |
|
144 showMaximizedButton = new QPushButton(tr("Show maximized")); |
|
145 connect(showMaximizedButton, SIGNAL(clicked()), this, SLOT(showMaximized())); |
|
146 showFullScreenButton = new QPushButton(tr("Show fullscreen")); |
|
147 connect(showFullScreenButton, SIGNAL(clicked()), this, SLOT(showFullScreen())); |
|
148 |
132 QVBoxLayout *layout = new QVBoxLayout; |
149 QVBoxLayout *layout = new QVBoxLayout; |
133 layout->addWidget(textEdit); |
150 layout->addWidget(textEdit); |
|
151 layout->addWidget(showNormalButton); |
|
152 layout->addWidget(showMaximizedButton); |
|
153 layout->addWidget(showFullScreenButton); |
134 layout->addWidget(closeButton); |
154 layout->addWidget(closeButton); |
135 setLayout(layout); |
155 setLayout(layout); |
136 |
156 |
137 setWindowTitle(tr("Preview <QDialog>")); |
157 setWindowTitle(tr("Preview <QDialog>")); |
138 } |
158 } |