How to make the QGridLayout create columns?
QGridLayout has ways to add widget in the columns, but will not help you get to what you want.

you better look for Flow Layout Example