[PyQt] Sudoku Grid - Recommended Approaches

Doug Bell dougb at bellz.org
Thu Feb 4 11:13:16 GMT 2010

Kareem Yusuf wrote:
> I'm looking for some advice on the best way to implement a sudoku grid using
> PyQt. I am new to PyQt and Python so my following thoughts are shaped by
> other language experiences (c# and Java).
>    1. I am assuming using a TableWidget is a bad idea, my experience has
>    shown you can never get the cells to be truly square

Why not?  If the QTableWidgetItem's size hint and the QTableWidget's
size policy are set appropriately, they should be square.  See the
pixelator example (included with PyQt) for an example of a square grid
(although it uses the model-view versions of the classes).

This should be easier and more efficient than your other options.


More information about the PyQt mailing list