class MyBr : public QMainWindow, public Ui::MyBrClass{ Q_OBJECTpublic: MyBr(QWidget *parent = 0, Qt::WFlags flags = 0); ~MyBr();public slots: void load(QString a);signals: void FormResize();protected: void resizeEvent( QResizeEvent* );};
MyBr::MyBr(QWidget *parent, Qt::WFlags flags) : QMainWindow(parent, flags){ setupUi(this); this->setWindowTitle(tr("Web-Rizek 2.0")); QPushButton * PrevButton = new QPushButton; PrevButton->setText("<-"); PrevButton->setFixedWidth(30); PrevButton->setToolTip(tr("Go back")); QPushButton * Refresh = new QPushButton; Refresh->setText("(%)"); Refresh->setFixedWidth(30); Refresh->setToolTip(tr("Refresh")); QPushButton * NextButton = new QPushButton; NextButton->setText("->"); NextButton->setFixedWidth(30); NextButton->setToolTip(tr("Go next")); QLineEdit * Address = new QLineEdit; Address->setFixedWidth(400); Address->setToolTip(tr("Adress of your site")); QPushButton * Go = new QPushButton; Go->setText(tr("Go!")); Go->setFixedWidth(35); Go->setToolTip(tr("Go")); QPushButton * StopButton = new QPushButton; StopButton->setText("X"); StopButton->setFixedWidth(30); StopButton->setToolTip(tr("Stop")); //******************* mainToolBar->addWidget(PrevButton); mainToolBar->addWidget(Refresh); mainToolBar->addWidget(NextButton); mainToolBar->addWidget(StopButton); mainToolBar->addWidget(Address); mainToolBar->addWidget(Go); //******************* //========================== connect(PrevButton, SIGNAL(clicked()), webView , SLOT(back())); connect(NextButton, SIGNAL( clicked()), webView , SLOT(forward())); connect(Refresh , SIGNAL(clicked()), webView, SLOT(Refresh())); connect(StopButton, SIGNAL(clicked()), webView, SLOT(stop())); connect(Go , SIGNAL(clicked()), this , SLOT(load())); //==========================}