[PyKDE] QtextEdit to file?
Andreas Pakulat
apaku at gmx.de
Wed Feb 15 17:47:34 GMT 2006
On 15.02.06 18:19:42, Tina Isaksen wrote:
> I need to save the contents of a QtextEdit box as a file text-file, retaining
> the carriage returns. I've been googling for an hour, studied QT-assistant, and
> I just don't get it... as usual. Any assistance will be greatly apreciated.
>From the QTextEdit you get a QString. You can then use this QString and
put it into a QDataStream. This one is created with a QFile which
resembles the actual file.
Check the mainwindow examples for actual code, especially the
application example (in both PyQt3 and PyQt4).
Andreas
--
Your lucky color has faded.
More information about the PyQt
mailing list