You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
dp4-uos/dp4-login-plugin/dp4loginwidget.cpp

37 lines
1.2 KiB

#include "dp4loginwidget.h"
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QLineEdit>
#include <QPushButton>
Dp4LoginWidget::Dp4LoginWidget(QWidget *parent)
: QWidget(parent)
{
QWidget *topWidget = new QWidget(this);
QLineEdit *topLineEdit = new QLineEdit(topWidget);
QPushButton *btn = new QPushButton(topWidget);
QHBoxLayout *topLayout = new QHBoxLayout(topWidget);
topLayout->addWidget(topLineEdit);
topLayout->addWidget(btn);
topLayout->addStretch();
topLayout->setSpacing(0);
topLayout->setContentsMargins(0,0,0,0);
QWidget *bottomWidget = new QWidget(this);
QLineEdit *bottomEdit = new QLineEdit(bottomWidget);
QPushButton *btnBottom = new QPushButton(bottomWidget);
QPushButton *btnBottom2 = new QPushButton(bottomWidget);
QHBoxLayout *bottomLayout = new QHBoxLayout(bottomWidget);
bottomLayout->addWidget(bottomEdit);
bottomLayout->addWidget(btnBottom);
bottomLayout->addWidget(btnBottom2);
bottomLayout->addStretch();
bottomLayout->setContentsMargins(50,0,0,0);
QVBoxLayout *layout = new QVBoxLayout(this);
layout->addWidget(topWidget);
layout->addWidget(bottomWidget);
// layout->setContentsMargins(0,0,0,0);
}