def __init__(self):
super(ProjectsWidget, self).__init__()
self.projects_list = ProjectListWidget()
# Buttons
self.new_project_button = QtWidgets.QPushButton(QtGui.QIcon(icons.add), 'New')
self.copy_project_button = QtWidgets.QPushButton(QtGui.QIcon(icons.copy), 'Copy current')
self.delete_project_button = QtWidgets.QPushButton(QtGui.QIcon(icons.delete), 'Delete current')
# Layout
self.h_layout = QtWidgets.QHBoxLayout()
self.h_layout.addWidget(header('Current Project:'))
self.h_layout.addWidget(self.projects_list)
self.h_layout.addWidget(self.new_project_button)
self.h_layout.addWidget(self.copy_project_button)
self.h_layout.addWidget(self.delete_project_button)
self.setLayout(self.h_layout)
self.setSizePolicy(QtWidgets.QSizePolicy(
QtWidgets.QSizePolicy.Maximum,
QtWidgets.QSizePolicy.Maximum)
)
self.connect_signals()
评论列表
文章目录