Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <QApplication>
- #include <QBoxLayout>
- #include <QPushButton>
- #include "myT.h"
- int main(int argc, char *argv[])
- {
- QApplication a(argc, argv);
- QString s;
- for(int i = 0; i < 256; ++i)
- s.append("123\n");
- QWidget w;
- QBoxLayout l(QBoxLayout::TopToBottom);
- myT ed;
- QPushButton b("push");
- l.addWidget(&ed);
- l.addWidget(&b);
- w.setLayout(&l);
- ed.setText(s);
- QObject::connect(&b,SIGNAL(clicked()),&ed,SLOT(v()));
- w.show();
- return a.exec();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement