QTableWidget排序问题

QTableWidget在启用排序的时候会自动调用sortByColumn() 函数进行排序,因此无须再次调用。启用排序函数为setSortingEnabled(bool enable),默认为false,启用代码如下:

tableWidget->setSortingEnabled(true);
This entry was posted in Qt, 原创 and tagged , . Bookmark the permalink.

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">