mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 19:27:49 +02:00
some qt gui changes
This commit is contained in:
parent
822995cbaf
commit
07fe51fa25
10 changed files with 148 additions and 14 deletions
|
@ -1,6 +1,24 @@
|
|||
#include "pagewithbackbutton.h"
|
||||
#include "QVBoxLayout"
|
||||
#include "QHBoxLayout"
|
||||
#include "QPushButton"
|
||||
|
||||
PageWithBackButton::PageWithBackButton(QWidget *parent) : QWidget(parent)
|
||||
PageWithBackButton::PageWithBackButton(QWidget *parent, QWidget* child) : QWidget(parent)
|
||||
{
|
||||
QVBoxLayout * layout = new QVBoxLayout();
|
||||
setLayout(layout);
|
||||
QWidget * topBar = new QWidget();
|
||||
QHBoxLayout * topBarLayout = new QHBoxLayout();
|
||||
topBar->setLayout(topBarLayout);
|
||||
layout->addWidget(topBar);
|
||||
layout->addWidget(child);
|
||||
|
||||
QPushButton * backButton = new QPushButton(topBar);
|
||||
backButton->setText("< Back");
|
||||
topBarLayout->addWidget(backButton);
|
||||
connect(backButton, SIGNAL(released()), this, SLOT(backReleasedSlot()));
|
||||
}
|
||||
|
||||
void PageWithBackButton::backReleasedSlot() {
|
||||
emit backReleased();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue