parent
ca6b54d4ea
commit
95b9ad0b44
@ -0,0 +1,37 @@ |
||||
#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);
|
||||
} |
||||
@ -0,0 +1,14 @@ |
||||
#ifndef DP4LOGINWIDGET_H |
||||
#define DP4LOGINWIDGET_H |
||||
|
||||
#include <QWidget> |
||||
|
||||
class Dp4LoginWidget : public QWidget |
||||
{ |
||||
Q_OBJECT |
||||
public: |
||||
explicit Dp4LoginWidget(QWidget *parent = nullptr); |
||||
|
||||
}; |
||||
|
||||
#endif // TESTWIDGET_H
|
||||
Loading…
Reference in new issue