mirror of
https://github.com/KenanZhu/AutoLibrary.git
synced 2026-06-18 23:43:02 +08:00
refactor(ALAboutDialog): replace hide/show methods with 'exec()' for dialog modal handling
This commit is contained in:
+10
-10
@@ -30,7 +30,7 @@ class ALAboutDialog(QDialog, Ui_ALAboutDialog):
|
|||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
parent=None
|
parent = None
|
||||||
):
|
):
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
|
|
||||||
@@ -67,21 +67,21 @@ Version: {AL_VERSION}<br>
|
|||||||
Python version: {platform.python_version()}<br>
|
Python version: {platform.python_version()}<br>
|
||||||
Qt version: {self.getQtVersion()}<br>
|
Qt version: {self.getQtVersion()}<br>
|
||||||
|
|
||||||
<h4>Author Information:</h4>
|
<h4>System Information:</h4>
|
||||||
Developer: KenanZhu<br>
|
Processor: {platform.processor()}<br>
|
||||||
Contact: nanoki_zh@163.com<br>
|
Operating system: {os_info['system']}<br>
|
||||||
GitHub: <a href="https://www.github.com/KenanZhu" style="text-decoration: none;">https://www.github.com/KenanZhu</a><br>
|
System version: {os_info['version']}<br>
|
||||||
|
System architecture: {os_info['architecture']}<br>
|
||||||
|
|
||||||
<h4>Project Information:</h4>
|
<h4>Project Information:</h4>
|
||||||
License: MIT License<br>
|
License: MIT License<br>
|
||||||
Project repository: <a href="https://www.github.com/KenanZhu/AutoLibrary" style="text-decoration: none;">https://www.github.com/KenanZhu/AutoLibrary</a><br>
|
Project repository: <a href="https://www.github.com/KenanZhu/AutoLibrary" style="text-decoration: none;">https://www.github.com/KenanZhu/AutoLibrary</a><br>
|
||||||
Project website: <a href="https://www.autolibrary.cv/" style="text-decoration: none;">https://www.autolibrary.cv/</a><br>
|
Project website: <a href="https://www.autolibrary.cv/" style="text-decoration: none;">https://www.autolibrary.cv/</a><br>
|
||||||
|
|
||||||
<h4>System Information:</h4>
|
<h4>Author Information:</h4>
|
||||||
Processor: {platform.processor()}<br>
|
Developer: KenanZhu<br>
|
||||||
Operating system: {os_info['system']}<br>
|
Contact: nanoki_zh@163.com<br>
|
||||||
System version: {os_info['version']}<br>
|
GitHub: <a href="https://www.github.com/KenanZhu" style="text-decoration: none;">https://www.github.com/KenanZhu</a><br>
|
||||||
System architecture: {os_info['architecture']}<br>
|
|
||||||
"""
|
"""
|
||||||
return about_text
|
return about_text
|
||||||
|
|
||||||
|
|||||||
@@ -6,25 +6,28 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>300</width>
|
<width>400</width>
|
||||||
<height>300</height>
|
<height>400</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>300</width>
|
<width>400</width>
|
||||||
<height>300</height>
|
<height>400</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>800</width>
|
<width>800</width>
|
||||||
<height>300</height>
|
<height>400</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>关于 - AutoLibrary</string>
|
<string>关于 - AutoLibrary</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizeGripEnabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<layout class="QVBoxLayout" name="ALAboutDialogLayout">
|
<layout class="QVBoxLayout" name="ALAboutDialogLayout">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>5</number>
|
<number>5</number>
|
||||||
@@ -95,6 +98,36 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="AboutInfoLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QFrame" name="frame">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>56</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>56</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::Shape::NoFrame</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Shadow::Plain</enum>
|
||||||
|
</property>
|
||||||
|
<property name="lineWidth">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTextEdit" name="AboutInfoEdit">
|
<widget class="QTextEdit" name="AboutInfoEdit">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
@@ -114,6 +147,8 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="CopyButton">
|
<widget class="QPushButton" name="CopyButton">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
|
|||||||
@@ -58,7 +58,6 @@ class ALMainWindow(QMainWindow, Ui_ALMainWindow):
|
|||||||
}
|
}
|
||||||
self.__alTimerTaskWidget = None
|
self.__alTimerTaskWidget = None
|
||||||
self.__alConfigWidget = None
|
self.__alConfigWidget = None
|
||||||
self.__alAboutDialog = None
|
|
||||||
self.__auto_lib_thread = None
|
self.__auto_lib_thread = None
|
||||||
self.__current_timer_task_thread = None
|
self.__current_timer_task_thread = None
|
||||||
self.__is_running_timer_task = False
|
self.__is_running_timer_task = False
|
||||||
@@ -85,9 +84,8 @@ class ALMainWindow(QMainWindow, Ui_ALMainWindow):
|
|||||||
self
|
self
|
||||||
):
|
):
|
||||||
|
|
||||||
if self.__alAboutDialog is None:
|
about_dialog = ALAboutDialog(self)
|
||||||
self.__alAboutDialog = ALAboutDialog(self)
|
about_dialog.exec()
|
||||||
self.__alAboutDialog.show()
|
|
||||||
|
|
||||||
|
|
||||||
def onManualActionTriggered(
|
def onManualActionTriggered(
|
||||||
|
|||||||
Reference in New Issue
Block a user