<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><div id="yiv1027567699"><table id="yiv1027567699bodyDrftID" class="yiv1027567699" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td id="yiv1027567699drftMsgContent" style="font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; font-family: arial; font-size: 10pt;">Hello, again, <br>I am pluging QGIS on Windows XP using Visual Studio 2008 compiler. I was able to set the user interface of my choice by using QTDesigner. I getting very comfortable and may be even getting hooked with QGIS. If QGIS fails then my research also fails. Such is the stake for me I am looking forward to the new release. <br><br>I need help with layer writers  ( QgsVectorFileWriter) and stream writers (QTextStream). I know one is QGIS and the other QT. But you guys are expert in both and may help
 resolve my problems. I want to tackle the QT problem first, I open the text file pointer using the code below (almost the code of the tutorial by Marco.) <br>&nbsp;&nbsp;&nbsp; QString fileName = QFileDialog::getSaveFileName(0,"Traffic Stress log file name");<br>&nbsp;&nbsp;&nbsp; if(!fileName.isNull())<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; QFile f(fileName);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(!f.open(QFile::WriteOnly | QFile::Truncate))<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; QMessageBox::information(0, "error", "Could not open file", QMessageBox::Ok);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; QTextStream txtStream(&amp;f);<br>&nbsp;&nbsp; }&nbsp; <br><br>I see the file created and yet when I try to write text data out I have not been successful
 at all. I have stream commands, such as the one below, thrown is at places I want to check the program's progress. They do compile without raising any errors and I also have message boxes with the variables come up during execution of the plugin, but nothing is being written to the disk file.<br>&nbsp;<br>&nbsp;&nbsp;&nbsp; txtStream &lt;&lt;" Traffic Stress update "&lt;&lt;qsNetlayerName&lt;&lt;endl;<br><br>The compilation is working with out an error message. Yet not a single character is written to the file. I added the flush command as in <br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; txtStream.flush();<br><br>Yet nothing is being written. What am I missing?<br><br>I have other challenges that I have to overcome with the QgsVectorFileWriter also.<br>It has been very unpredictable with how the data is being written out. I am not sure if it is possible to run the plugin in debug mode on the Windows platform, but
 that may help newbie QGIS programmers like myself. But it may be too much to ask considering the work that all of you guys have already done. yet, I am asking it may already be possible to run a plugin in debug mode. Is it?<br><br>Thank you,<br><br>Maaza&nbsp; <br><br></td></tr></tbody></table></div></td></tr></table>