[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyKDE] [pyQT] qiconview segmentation fault
From:       piotr_maliński <riklaunim () gmail ! com>
Date:       2006-01-26 18:09:09
Message-ID: 1f7f7cf70601261009i7fba914ax () mail ! gmail ! com
[Download RAW message or body]

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 :/

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic