Grid layout is creating values and lists
[ 1 ][ 2 ][ 3 ][ 4 ]
[ 5 ][ 6 ][ 7 ][ 8 ]
Like the one above, I'm making 4 x 2 slots
i
and j
were made as coordinate values, but I want to put 8 widget values in the list value, but I don't know what it is
I don't know if I should do it this way.
a = [1,2,3,4,5,6,7,8]
b = 0
for i in range(2):
for j in range(4):
grid1.addWidget(a[b], i, j)
b += 1
I made it this way, but what's a more accurate way?
pyqt python
Are you asking me this?
a = [1,2,3,4,5,6,7,8]
for i in range(2):
for j in range(4):
grid1.addWidget(a[i*4+j], i, j)
578 Understanding How to Configure Google API Key
617 Uncaught (inpromise) Error on Electron: An object could not be cloned
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
610 GDB gets version error when attempting to debug with the Presense SDK (IDE)
572 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.