• 7409阅读
  • 2回复

[提问]如何判断QListWidget里面是否存在某项? [复制链接]

上一主题 下一主题
离线玉清
 
只看楼主 倒序阅读 楼主  发表于: 2011-11-18
比如说一个QListWidget里面有One,Two,Three三项。

我传递一个字符串One参数给QListWidget判断当前是否存在于里面。

我没在QListWidget里面找到现成的方法,求指教谢谢。
离线ppdayz

只看该作者 1楼 发表于: 2011-11-18
回 楼主(玉清) 的帖子
QList<QListWidgetItem *> QListWidget::findItems ( const QString & text, Qt::MatchFlags flags ) const
Finds items with the text that matches the string text using the given flags.
离线玉清
只看该作者 2楼 发表于: 2011-11-25
回 1楼(ppdayz) 的帖子
谢谢~已经解决~~~~
快速回复
限100 字节
 
上一个 下一个