2021-08-30 20:31:33 +02:00
|
|
|
#include <QFormLayout>
|
|
|
|
#include "authenticationwidget.h"
|
|
|
|
|
|
|
|
AuthenticationWidget::AuthenticationWidget(QWidget *parent) : QWidget(parent)
|
|
|
|
{
|
|
|
|
_username = new QLineEdit();
|
2021-09-20 21:58:08 +02:00
|
|
|
_password = new PasswordEdit();
|
2021-09-26 11:33:50 +02:00
|
|
|
#ifdef Q_OS_MAC
|
|
|
|
/* A hack to fix the issue with different field sizes on Mac */
|
|
|
|
_username->setMinimumWidth(150);
|
|
|
|
_password->setMinimumWidth(150);
|
|
|
|
#endif // Q_OS_MAC
|
2021-08-30 20:31:33 +02:00
|
|
|
|
|
|
|
QFormLayout *layout = new QFormLayout();
|
|
|
|
layout->addRow(tr("Username:"), _username);
|
|
|
|
layout->addRow(tr("Password:"), _password);
|
2021-08-31 18:43:55 +02:00
|
|
|
layout->setContentsMargins(0, 0, 0, 0);
|
2021-08-30 20:31:33 +02:00
|
|
|
|
|
|
|
setLayout(layout);
|
|
|
|
}
|