#include "preferencewidget.h"
#include "ui_preferencewidget.h"
#include <QTabWidget>
#include <QPushButton>
#include <QDebug>
#include <QLayout>
#include <QVBoxLayout>
PreferenceWidget::PreferenceWidget(QWidget *parent) :
QWidget(parent),
ui(new Ui::PreferenceWidget)
{
ui->setupUi(this);
QTabWidget *tab = new QTabWidget(this);
QWidget *browser_tab = new QWidget;
QWidget *users_tab = new QWidget;
tab->addTab(browser_tab, "Browser");
tab->addTab(users_tab, "Users");
tab->setGeometry(20, 20, 300, 250);
QPushButton *btn = new QPushButton("Btn1");
btn->setGeometry(10, 30, 100, 40);
btn->setParent(users_tab);
QVBoxLayout *vl = new QVBoxLayout(users_tab);
vl->addWidget(btn);
users_tab->setLayout(vl);
connect(btn, SIGNAL(clicked()), this, SLOT(clickedAlert()));
}
PreferenceWidget::~PreferenceWidget()
{
delete ui;
}
void PreferenceWidget::clickedAlert()
{
qDebug() << "Clicked";
}
Bookmarks