mirror of
https://gitlab.com/comunic/comunicwatcher
synced 2024-12-25 04:58:57 +00:00
Made a borderless login window
This commit is contained in:
parent
c4b85dbf9c
commit
416e6d44c5
BIN
ic_close.png
Normal file
BIN
ic_close.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 344 B |
@ -6,6 +6,8 @@ LoginWindow::LoginWindow(QWidget *parent)
|
||||
, ui(new Ui::LoginWindow)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
setWindowFlag(Qt::FramelessWindowHint);
|
||||
}
|
||||
|
||||
LoginWindow::~LoginWindow()
|
||||
@ -13,3 +15,8 @@ LoginWindow::~LoginWindow()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
void LoginWindow::on_closeButton_clicked()
|
||||
{
|
||||
this->close();
|
||||
}
|
||||
|
@ -20,6 +20,9 @@ public:
|
||||
LoginWindow(QWidget *parent = nullptr);
|
||||
~LoginWindow();
|
||||
|
||||
private slots:
|
||||
void on_closeButton_clicked();
|
||||
|
||||
private:
|
||||
Ui::LoginWindow *ui;
|
||||
};
|
||||
|
@ -2,6 +2,9 @@
|
||||
<ui version="4.0">
|
||||
<class>LoginWindow</class>
|
||||
<widget class="QWidget" name="LoginWindow">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::ApplicationModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@ -20,6 +23,82 @@
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: #3c8dbc;
|
||||
color: white;
|
||||
</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">padding-left: 2px;
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Login to Comunic</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="closeButton">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QToolButton {
|
||||
background-color: transparent;
|
||||
border: 0px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
QToolButton:hover:!pressed {
|
||||
background-color: rgba(255, 255, 255, 158)
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="ressources.qrc">
|
||||
<normaloff>:/ic_close.png</normaloff>:/ic_close.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="ressources.qrc"/>
|
||||
|
3
main.cpp
3
main.cpp
@ -5,7 +5,10 @@
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
|
||||
LoginWindow w;
|
||||
w.show();
|
||||
|
||||
|
||||
return a.exec();
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>logo_large.png</file>
|
||||
<file>ic_close.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
Loading…
Reference in New Issue
Block a user