
Originally Posted by
anda_skoa
First: it makes little sense to post code that is not the actual code.
Second: is "browser" a class generated by QtCreator template (form class)? If not, did you correctly instantiate the UI class and call its setupUi() function?
Does the form have proper layouting?
Cheers,
_
Well i will give more info to sort it out
browser.h
#ifndef BROWSER_H
#define BROWSER_H
#include <QWidget>
namespace Ui {
class browser;
}
{
Q_OBJECT
public:
explicit browser
(QWidget *parent
= 0);
~browser();
private slots:
void on_pushButton_clicked();
void on_pushButton_2_clicked();
void on_pushButton_4_clicked();
void on_pushButton_3_clicked();
void on_lineEdit_textEdited
(const QString &arg1
);
void on_webView_destroyed();
void on_browser_accepted();
private:
Ui::browser *ui;
};
#endif // BROWSER_H
#ifndef BROWSER_H
#define BROWSER_H
#include <QWidget>
namespace Ui {
class browser;
}
class browser : public QWidget
{
Q_OBJECT
public:
explicit browser(QWidget *parent = 0);
~browser();
private slots:
void on_pushButton_clicked();
void on_pushButton_2_clicked();
void on_pushButton_4_clicked();
void on_pushButton_3_clicked();
void on_lineEdit_textEdited(const QString &arg1);
void on_webView_destroyed();
void on_browser_accepted();
private:
Ui::browser *ui;
};
#endif // BROWSER_H
To copy to clipboard, switch view to plain text mode
browser.cpp
#include "browser.h"
#include "ui_browser.h"
browser
::browser(QWidget *parent
) : ui(new Ui::browser)
{
// ui->setupUi(this);
}
browser::~browser()
{
delete ui;
}
void browser::on_pushButton_clicked()
{
}
void browser::on_pushButton_2_clicked()
{
}
void browser::on_pushButton_4_clicked()
{
}
void browser::on_pushButton_3_clicked()
{
}
void browser
::on_lineEdit_textEdited(const QString &arg1
) {
}
void browser::on_webView_destroyed()
{
}
void browser::on_browser_accepted()
{
}
#include "browser.h"
#include "ui_browser.h"
browser::browser(QWidget *parent) :
QWidget(parent),
ui(new Ui::browser)
{
// ui->setupUi(this);
}
browser::~browser()
{
delete ui;
}
void browser::on_pushButton_clicked()
{
}
void browser::on_pushButton_2_clicked()
{
}
void browser::on_pushButton_4_clicked()
{
}
void browser::on_pushButton_3_clicked()
{
}
void browser::on_lineEdit_textEdited(const QString &arg1)
{
}
void browser::on_webView_destroyed()
{
}
void browser::on_browser_accepted()
{
}
To copy to clipboard, switch view to plain text mode
In mainwindow.h i added this
private:
Ui::MainWindow *ui;
browser browser1;
};
private:
Ui::MainWindow *ui;
browser browser1;
};
To copy to clipboard, switch view to plain text mode
and in "void" of the button which call the new form i added
browser1.show();
browser1.show();
To copy to clipboard, switch view to plain text mode
The class generated by qt after i made the qt form(ui) called browser
Bookmarks