Yes, you can do Tic tac toe with QGridLayout in container widgets.
About strings: this is a handy tool offered by Qt Designer, it does not exist directly. In fact, the string is a QFrame with some restyling:
QFrame* line = new QFrame(); line->setGeometry(QRect()); line->setFrameShape(QFrame::HLine);
You should give this frame a non-empty height (or width for vertical), for example 2 pixels. Lines in the GUI can only be horizontal or vertical.
Note If you donβt know how the widget is made in Qt Designer (even the one included in Qt Creator), you should create a dialog containing only the desired widget, and then view the generated code.
source share