-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest_button_click_fix.py
More file actions
46 lines (35 loc) · 1.13 KB
/
Copy pathtest_button_click_fix.py
File metadata and controls
46 lines (35 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
测试按钮点击修复
"""
import sys
import os
# 添加项目根目录到Python路径
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from PySide6.QtWidgets import QApplication
from app.quickpick.panel import QuickPickPanel
from db.markrender_manager import MarkRenderManager
def test_button_click_fix():
"""测试按钮点击修复"""
print("开始测试按钮点击修复...")
# 创建 QApplication 实例
app = QApplication(sys.argv)
# 创建 MarkRenderManager 实例
manager = MarkRenderManager()
# 创建 QuickPickPanel 实例
panel = QuickPickPanel(manager)
# 测试方法是否存在
methods_to_test = [
'show_add_menu',
'show_more_menu'
]
print("测试方法是否存在:")
for method_name in methods_to_test:
if hasattr(panel, method_name):
print(f" ✓ {method_name} 方法存在")
else:
print(f" ✗ {method_name} 方法不存在")
print("按钮点击修复测试完成!")
if __name__ == "__main__":
test_button_click_fix()