So,I'm making a Tic Tac Toe game and I'd like to put my buttons,like: 3 rows of 3 buttons.
So far I have this:
Qt Code:
hl1->addWidget(btn[0]); hl1->addWidget(btn[1]); hl1->addWidget(btn[2]); hl2->addWidget(btn[3]); hl2->addWidget(btn[4]); hl2->addWidget(btn[5]); hl3->addWidget(btn[6]); hl3->addWidget(btn[7]); hl3->addWidget(btn[8]); vl1->addLayout(hl1); vl1->addLayout(hl2); vl1->addLayout(hl3); win->setLayout(vl1); TicTacToe::setCentralWidget(win);To copy to clipboard, switch view to plain text mode
But buttons here have the normal size..how can I make then be square?
Thank you.
Bookmarks