1
最近看新加坡总理李显龙说他写过一个数独的C++代码,我也想试试,
于是用qt写了一个带界面的程序,
2
主要用了tableWidget
`tablewidget->setRowCount(9); //设置行数
tablewidget->setColumnCount(9);//设置列数
tablewidget->horizontalHeader()->setDefaultSectionSize(65);//设置列高
tablewidget->verticalHeader()->setDefaultSectionSize(65);//设置行宽
tablewidget->setStyleSheet("selection-background-color:lightblue;");//设置样式表
tablewidget->setStyleSheet("background-color: cyan;color:red");
QTableWidgetItem item 获取item的内容
setitem 设置item的内容
`
3
在我的github帐号里面有代码,有兴趣可以看看。