PDA

View Full Version : IO_Raw unrecognized???



Hockey
29th November 2007, 22:12
Here is my simple code:


#include <qapplication.h>
#include <qfile.h>
#include <qwidget.h>

class MyWidget : public QWidget
{
public:
MyWidget(QWidget *parent = 0);
};

MyWidget::MyWidget(QWidget *parent) : QWidget(parent)
{
setFixedSize(500, 450);

QFile file("test.php");
file.open(IO_Raw);

//QString buff;

file.close();
}

int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MyWidget widget;
widget.show();

return app.exec();
}

When I attempt to build I get this error unless I comment out the file.open(IO_Raw) line???

I just want to load some text data into a single buffer. :(

Can someone tell me what i'm doing wrong?

jacek
29th November 2007, 22:16
Could you post the first error you get? Aren't you mixing Qt3 and Qt4?

Hockey
30th November 2007, 05:56
Here is the error...


main.cpp:16: error: `IO_Raw' undeclared (first use this function)

I'm using Qt 4 only as far as I know - at least thats all I installed.

high_flyer
30th November 2007, 10:09
I'm using Qt 4 only as far as I know - at least thats all I installed.
but you are using Qt3 headers.

jacek
30th November 2007, 11:37
I'm using Qt 4 only as far as I know - at least thats all I installed.
IO_Raw is from Qt3 and Qt3 isn't compatible with Qt4.