fork download
  1. {
  2. ui->setupUi(this);
  3. frame2 = new QFrame(this);
  4. frame2->setFrameStyle(QFrame::Box);
  5. cu = new QCursor();
  6. frame2->setMouseTracking(true);
  7. QRect fg = QApplication::desktop()->screenGeometry();
  8. QRect d = fg;
  9. fg.setWidth(static_cast<int>(fg.width()*0.3));
  10. fg.setHeight(static_cast<int>(fg.height()*0.25));
  11. this->move(d.width()/2-fg.width()/2, d.height()/2-fg.height()/2);
  12. this->setFixedSize(fg.width(),fg.height());
  13. frame2->setGeometry(static_cast<int>(width()/2-width()*0.8/2),static_cast<int>(height()/2-height()*0.8/2),static_cast<int>(width()*0.8),static_cast<int>(height()*0.8));
  14. setWindowIcon(QIcon("C://Users//web.png"));
  15. setWindowTitle("Laba");
  16. button = new QPushButton("Button", this);
  17. button->setGeometry(width()/2-button->width()/2, height()/2-button->height()/2,button->width(),button->height());
  18. button-> show();
  19. setMouseTracking(true);
  20. button2 = new QPushButton("Options", this);
  21. button2 -> move(0,0);
  22. button2 -> show();
  23. p = this->palette();
  24. /*lble = new QLabel("1");
  25.   lble->setGeometry(100, 100,60,30);
  26.   lble->show();
  27.   lble2 = new QLabel("2");
  28.   lble2->setGeometry(200, 100,60,30);
  29.   lble2->show();
  30.   lble3 = new QLabel("3");
  31.   lble3->setGeometry(300, 100,60,30);
  32.   lble3->show();*/
  33. show();
  34. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1:1: error: expected unqualified-id before ‘{’ token
 {
 ^
stdout
Standard output is empty