I am a beginner and I had previously written a piece of code with pyqt5 and now I want to upgrade the source to pyqt6.
I don't know what to write instead of the code below
spacer_item = QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy..Minimum, QtWidgets.QSizePolicy.Maximum)
I read the document and I think it should be
QtWidgets.QSizePolicy.setHorizontalPolicy()
I should use it and pass a policy object to it. But I don't know how to create the policy object
pls help me guys