Авторизация Кнопка Login in

This commit is contained in:
2025-09-15 12:45:53 +03:00
parent 762437a908
commit 8c3e636d27
4 changed files with 36 additions and 47 deletions

View File

@@ -17,3 +17,8 @@ DialogAuthorizationInstructor::~DialogAuthorizationInstructor()
{
delete ui;
}
void DialogAuthorizationInstructor::on_btnOK_clicked()
{
this->accept();
}

View File

@@ -16,6 +16,7 @@ public:
explicit DialogAuthorizationInstructor(QWidget *parent = nullptr);
~DialogAuthorizationInstructor();
public:
QString getLogin()
{
return ui->editLogin->text();
@@ -26,6 +27,9 @@ public:
return ui->editPassword->text();
}
private slots:
void on_btnOK_clicked();
private:
Ui::DialogAuthorizationInstructor *ui;
};

View File

@@ -87,62 +87,41 @@
</layout>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<enum>Qt::Vertical</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QPushButton" name="btnOK">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Login in</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<resources>
<include location="../resources.qrc"/>
</resources>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>DialogAuthorizationInstructor</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>DialogAuthorizationInstructor</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
<connections/>
</ui>

View File

@@ -289,6 +289,7 @@ bool InstructorsAndTraineesWidget::authorizationInstructorDialog(QWidget* parent
DialogAuthorizationInstructor dlg(parent);
dlg.setWindowTitle(tr("Instructor authorization"));
dlg.setWindowFlags(dlg.windowFlags() & ~Qt::WindowContextHelpButtonHint);
dlg.setStyleSheet(this->styleSheet());
do
{