I would like to add a spacer line between two layouts:
Separador = QFrame()
Separador.Shape(QFrame.HLine)
Separador.setSizePolicy(QSizePolicy.Minimum,QSizePolicy.Expanding)
Separador.setLineWidth(3)
HPOUT1_layout = QVBoxLayout()
HPOUT1_layout.addLayout(HPOUT1L_layout)
HPOUT1_layout.addWidget(Separador)
HPOUT1_layout.addLayout(HPOUT1R_layout)
However, this code only separate the layouts a little, but there is no line visible between them. Is there another way, What I'm doing wrong?
You are not setting the shape of the frame correctly.
Instead of
Separador.Shape(QFrame.HLine)
use
Separador.setFrameShape(QFrame.HLine)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With