[PyKDE] [pyQT] qiconview segmentation fault

piotr maliński riklaunim at gmail.com
Thu Jan 26 18:09:09 GMT 2006


I have a problem with qiconview - I use it to list files and folders.
The path to list is taken from 1) lineedit and 2) via clicks on
folders from the qiconview. The first one works, the second one ends
with segmentation fault. the slot function looks like this:
############################
    def listuj_iconview(self):
        import glob
        import os.path
        itm = self.iconView1.currentItem()
        path = str(self.lineEdit2.text()) + "/" + str(QIconViewItem(itm).text())

        if os.path.exists(path) and os.path.isdir(path):
          self.lineEdit2.setText(path)
          path = path + "/*"
          dirlist = glob.glob(path)
          self.iconView1.clear()
          self.dir = QPixmap('images/folder.png')
          self.dirlink = QPixmap('images/folder_link.png')
          self.file = QPixmap('images/file.png')
          for folder in dirlist:
            if os.path.isdir(folder):
              if os.path.islink(folder):
                nazwa = folder.split('/')
                QIconViewItem( self.iconView1, nazwa.pop(), self.dirlink )
              else:
                nazwa = folder.split('/')
                QIconViewItem( self.iconView1, nazwa.pop(), self.dir )
          for file in dirlist:
            if os.path.isfile(file):
              nazwa = file.split('/')
              QIconViewItem( self.iconView1, nazwa.pop(), self.file )
############################
and it dies on self.iconView1.clear(). I've googled out this message:
http://mats.imk.fraunhofer.de/pipermail/pykde/2001-July/001324.html
but it doesn't help me. I've tried various things like clearSelected()
and/or close() before and show() after the clear() function. I use:
qscintilla-1.5.1, PyQt-3.14.1 and sip-4.2.1 on gentoo. I've tested it
on current Arch with the same result :/




More information about the PyQt mailing list