我在对话框的滚动区域中有一个网格区域
class IndicSelectWindow(QDialog):
def __init__(self, path, parent=None):
super(IndicSelectWindow, self).__init__(parent)
self.resize(500, 400)
self.scroll_area = QScrollArea(self)
self.scroll_area.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
self.grid_layout = QGridLayout(self.scroll_area)
self.exec_()
如何使网格覆盖scroll_area的整个区域。它没有方法setSizePolicy。我怎样才能做到这一点?