在学习PySide6时,犯了一个低级错误,我写了一段代码
import sys
from PySide6.QtCore import Qt
from PySide6.QtWidgets import (QApplication, QCheckBox, QDialog,
QDialogButtonBox, QGridLayout, QHBoxLayout,
QLabel, QLayout, QLineEdit, QPushButton,
QVBoxLayout, QWidget)
class Window(QWidget):
def __init__(self, parent=None):
super().__init__(parent)
label = QLabel("Find &what:")
line_edit = QLineEdit()
label.setBuddy(line_edit)
case_check_box = QCheckBox("Match &case")
from_start_check_box = QCheckBox("Search from &start")
from_start_check_box.setChecked(True)
find_button = QPushButton("&Find")
find_button.setDefault(True)
button_box = QDialogButtonBox(Qt.Vertical)
b