Layout

Katılım
24 Şub 2021
Mesajlar
20
Puanları
1
Yaş
17
merhaba arkadaşlar yapmak istediğim bir programda pyqt5 ile bi datasheet tarzı bir şey yapmak istiyorum ama bu layout kullanımlarını tam olarak bilmiyorum iki üç veya beş layout oluşturup bunları sayfaya nasıl yerleştireceğimi tam olarak anlayamadım aşağıda örnek olarak yazdığım kodda iki farklı grid layout oluşturdum ama bunları nasıl yan yana yerleştireceğim hakkında hiç bir fikrim yok ingilizcem fazla olmadığı için de fazla kaynak bulamadım ve bu sebeple sizden yardım istemek istedim bu iki layoutu yan yyana katmayı bilen varsa lütfen yardımcı olsun

şimdiden teşekkürler



from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
import sys


app = QApplication(sys.argv)
ana_sayfa = QWidget()
ana_sayfa.show()

buton1 = QPushButton()
buton1.setText("a")
buton1.show()

buton11 = QPushButton()
buton11.setText("a")
buton11.show()

buton2 = QPushButton()
buton2.setText("B")
buton2.show()

buton22 = QPushButton()
buton22.setText("U")
buton22.show()

buton3 = QPushButton()
buton3.setText("C")
buton3.show()

buton33 = QPushButton()
buton33.setText("O")
buton33.show()

buton4 = QPushButton()
buton4.setText("D")
buton4.show()

buton44 = QPushButton()
buton44.setText("P")
buton44.show()

fbox = QGroupBox(ana_sayfa)
Gbox = QGridLayout(ana_sayfa)
GGbox= QGridLayout(ana_sayfa)
Gbox.addWidget(buton1,0,0)
Gbox.addWidget(buton2,0,1)
Gbox.addWidget(buton3,1,0)
Gbox.addWidget(buton4,1,1)


GGbox.addWidget(buton11,2,0)
GGbox.addWidget(buton22,2,1)
GGbox.addWidget(buton33,3,0)
GGbox.addWidget(buton44,3,1)






app.exec()
 

Forum istatistikleri

Konular
128,198
Mesajlar
915,765
Kullanıcılar
449,978
Son üye
food_eng_1952

Yeni konular

Geri
Üst