[Qgis-user] 'QLineEdit' object has no attribute 'delete' error in QGIS Dufour plugin

Suryo Miles suryomiles666 at gmail.com
Sun Dec 1 19:47:28 PST 2013


When i try to open text in textBrowser with command read i got this error
message

def cari(self, event=None):

        #open dialog
        filename = QtGui.QFileDialog.getOpenFileName(self, 'Open File',
'*.xml')

        if filename:
            self.ui.lineFile.delete(0, END)
            self.ui.lineFile.insert(END, filename)

        #panggil isi data
        self.isiDataFile(filename)

    def isiDataFile(self, nmfile):
        #buka dengan open mode baca
        teksFile = open(nmfile, 'r').read()

        self.ui.textFile.delete('1.0', END)
        self.ui.textFile.insert('1.0', teksFile)

Traceback (most recent call last):
  File "C:\Users\Mr.Pakde/.qgis2/python/plugins\latih\latihdialog.py", line
44, in cari
    self.ui.lineFile.delete(0, END)

 'QLineEdit' object has no attribute 'delete'

Can someone help me?
I m new in python and QGIS so i dont know what i must do
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20131202/364fb46f/attachment.html>


More information about the Qgis-user mailing list