Advertisement
VlaoMao

main.cpp

Nov 2nd, 2013
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. #include <QApplication>
  2. #include <QBoxLayout>
  3. #include <QPushButton>
  4. #include "myT.h"
  5.  
  6.  
  7. int main(int argc, char *argv[])
  8. {
  9.     QApplication a(argc, argv);
  10.  
  11.     QString s;
  12.  
  13.     for(int i = 0; i < 256; ++i)
  14.         s.append("123\n");
  15.  
  16.     QWidget w;
  17.     QBoxLayout l(QBoxLayout::TopToBottom);
  18.     myT ed;
  19.     QPushButton b("push");
  20.     l.addWidget(&ed);
  21.     l.addWidget(&b);
  22.     w.setLayout(&l);
  23.     ed.setText(s);
  24.  
  25.     QObject::connect(&b,SIGNAL(clicked()),&ed,SLOT(v()));
  26.  
  27.     w.show();
  28.    
  29.     return a.exec();
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement