<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>laco0416</author_name>
  <author_url>https://blog.hatena.ne.jp/laco0416/</author_url>
  <blog_title>らこらこブログ</blog_title>
  <blog_url>https://laco0416.hatenablog.com/</blog_url>
  <categories>
    <anon>Python</anon>
    <anon>PyQt</anon>
  </categories>
  <description>てっきりremoveAll()とかclear()とかあるものだと思ってたのでびっくりした。 こんな感じですっきりかけました。 for i in range(listWidget.count()): listWidget.takeItem(0) takeItem(int)は引数のインデックスにある要素を取り出して削除するメソッドですが、取り出されると同時にソートされているようなので全て0位置の要素を削除しています。Slotにclear()ありました listWidget.clear() でOKです</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Flaco0416.hatenablog.com%2Fentry%2F20121019%2F1350636301&quot; title=&quot;PyQt4 QListWidgetの要素をすべて削除する - らこらこブログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2012-10-19 17:45:01</published>
  <title>PyQt4 QListWidgetの要素をすべて削除する</title>
  <type>rich</type>
  <url>https://laco0416.hatenablog.com/entry/20121019/1350636301</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
