Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
Using a pointer to QTextStream segfaults my app
Okay I'm in a tricky spot here.
I have a class for handling a KTextEditer, QTStream and misc other things.
The problem is though that there are two ways to implement file writing
support.
1: Write into the class's private section that there is a stream and then initialize
the stream in the class's constructor. This won't compile with g++.
2: In the class constructor Declare the stream and have in the private section
a pointer (which is then given the address of the real stream in the constructor.
This seamed good in theory but the line: streamPtr->operator<<( editField->text() );
caused a seg fault.
Can somebody explain the correct approach please?
---
Iwasapenguin