Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 QListWidgetItem* 并想知道是否可以从该指针中提取行而不遍历整个列表
如果您需要行号,请使用以下函数:
int QListWidget::row(const QListWidgetItem *) const
它不仅仅来自指针,但您不需要迭代。