如何使用 QTable?添加、编辑、删除和检索行
如何使用 QTable 对象。我在网上搜索过,这些例子似乎并没有什么意义。您是否只是在扩展类中创建一个新行。一切看起来都很热闹。如何检索、编辑和删除行。是否有任何可以使用的扩展,例如
QRowObject *row = table->add("Main Title");
row->addSubColumnText("Second column");
otherRow = table->getRowByIndex(table->selectedIndex);
otherRow.remove;
如何实现它?
需要任何额外信息只需询问。
How do you use the QTable object. I have searched the internet and the examples don't really seem to make sense. Do you just create a new row within the extended class. It all seems fussing. How do you retreive, edit and delete rows. Is there any extensions that could be used like
QRowObject *row = table->add("Main Title");
row->addSubColumnText("Second column");
otherRow = table->getRowByIndex(table->selectedIndex);
otherRow.remove;
How would any implement that?
Any extra information needed just ask.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
QTable 已经很老了。您可能正在寻找QTableWidget。如果您想了解整个“模型视图”架构,请查看 QTableView 。
QTable is pretty old. You might be looking for QTableWidget. If you want to get into the whole 'Model-View' arch thing, look into QTableView.