<div dir="ltr">As a quick answer: you're setting the tex(not getting)t in <div><br></div><div><span style="font-family:arial,sans-serif;font-size:13px"> f.write( 'Rekomendasi :' + str(self.ui.textRec1.</span><span style="font-family:arial,sans-serif;font-size:13px">setPlainText()) )</span></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">It should be something like</font></div><div><font face="arial, sans-serif"><br></font></div><div><span style="font-size:13px;font-family:arial,sans-serif"> f.write( 'Rekomendasi :' + str(self.ui.textRec1.te</span><span style="font-size:13px;font-family:arial,sans-serif">xt()) )</span></div>
<div><br></div><div>(I guess that self.ui.textRec1 is a QLineEdit, of course)</div><div><br></div><div>Happy New Year!!</div><div><br></div><div><br></div><div>Jorge Tornero</div><div><div><br></div></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">2014/1/1 Suryo Miles <span dir="ltr"><<a href="mailto:suryomiles666@gmail.com" target="_blank">suryomiles666@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">I try to make save as button but i got this error message when try to save file in my directory<br><br>    File "C:\Users\Mr.Pakde/.qgis2/python/plugins\condition\conditiondialog.py", line 80, in saveAs<br>

        self._save( _filename )<br>    File "C:\Users\Mr.Pakde/.qgis2/python/plugins\condition\conditiondialog.py", line 68, in _save<br>        f.write( 'Rekomendasi :' + str(self.ui.textRec1.setPlainText() ) )<br>

    TypeError: QTextEdit.setPlainText(QString): not enough arguments<br><br>this is my code<br><br>    Smpan = self.ui.btnSave<br>            QtCore.QObject.connect(Smpan, QtCore.SIGNAL('clicked()'),self.saveAs)        <br>

    <br>        def Compare1(self):<br>            input1 = self.ui.lineInput1.text()<br>            input2 = self.ui.lineInput2.text()<br>            compare = ''<br>            if input1 == input2:<br>                compare = 'Data dapat digunakam'<br>

            else:<br>                compare = 'Data tidak cocok'<br>            self.ui.textRec1.setPlainText(compare)<br>    <br>        def _save(self, simpan):        <br>            f = open( simpan, 'w' )<br>

            f.write( 'Input 1 :' + str(self.ui.lineInput1.text()) ) <br>            f.write( 'Input 2 :' + str(self.ui.lineInput2.text()) )<br>            f.write( 'Rekomendasi :' + str(self.ui.textRec1.setPlainText()) )        <br>

            f.close()<br>        def savefile(self):<br>            if self.simpan:<br>                  self._save( "%s" % self.simpan )<br>            else:<br>                  self.saveAs()<br>    <br>        def saveAs(self):<br>

                tulis = QtGui.QFileDialog(self).getSaveFileName()<br>                if tulis !="":<br>                    _filename = "%s" % tulis<br>                    self._save( _filename )<br><br>

<br></div>
<br>_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br></blockquote></div><br></div>