更新控制
This commit is contained in:
10
test.py
10
test.py
@ -1,9 +1,12 @@
|
||||
from PySide6.QtWidgets import QApplication, QPushButton, QMainWindow
|
||||
from PySide6.QtWidgets import QApplication, QPushButton, QMainWindow, QMessageBox
|
||||
from PySide6.QtCore import QPropertyAnimation, QPoint, QParallelAnimationGroup, QEasingCurve, Property
|
||||
from PySide6.QtGui import QColor, QPainter, QBrush
|
||||
from PySide6.QtCore import Qt
|
||||
import sys
|
||||
|
||||
import Constant
|
||||
|
||||
|
||||
class RippleButton(QPushButton):
|
||||
def __init__(self, text, parent=None):
|
||||
super().__init__(text, parent)
|
||||
@ -84,6 +87,11 @@ class MainWindow(QMainWindow):
|
||||
|
||||
self.button = RippleButton("点击我", self)
|
||||
self.button.setGeometry(150, 130, 100, 40)
|
||||
self.button.clicked.connect(self.on_button_click)
|
||||
def on_button_click(self):
|
||||
print("按钮被点击了!")
|
||||
QMessageBox.information(None, "提示", Constant.str_feed_photo_error_msgbox)
|
||||
print("sadf")
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = QApplication(sys.argv)
|
||||
|
||||
Reference in New Issue
Block a user