0
I’m a beginner and I’m doing a graphical interface with the help of pyqt4. I need to add two columns of buttons there where there’s only one, but every time I try, the button goes to the right and ruins the proportions. Can anyone help me? What I have so far is this:
self.main_frame = qg.QWidget()
self.area_canvas()
self.create_toolbox()
self.botao_enviar = qg.QPushButton('ENVIAR')
self.botao_salvarr = qg.QPushButton('SALVAR')
self.botao_restaurar = qg.QPushButton("RESTAURAR")
self.botao_criar = qg.QPushButton(_tr("CRIAR"))
grid = qg.QGridLayout()
grid.addWidget(self.canvas,0,0,5,4)
grid.addWidget(self.botao_enviarr,0,4)
grid.addWidget(self.botao_salvar,1,4)
grid.addWidget(self.botao_restaurar,2,4)
grid.addWidget(self.botao_criar,3,4)
grid.addWidget(self.toolBox,4,4)
grid.addWidget(self.chk_id_pontos,6,0)
grid.addWidget(self.chk_id_barras,6,1)
self.main_frame.setLayout(grid)
self.setCentralWidget(self.main_frame)
It served perfectly! Thank you very much!!!
– Mi Tavares