Results 1 to 5 of 5

Thread: IO_Raw unrecognized???

  1. #1

    Default IO_Raw unrecognized???

    Here is my simple code:

    Qt Code:
    1. #include <qapplication.h>
    2. #include <qfile.h>
    3. #include <qwidget.h>
    4.  
    5. class MyWidget : public QWidget
    6. {
    7. public:
    8. MyWidget(QWidget *parent = 0);
    9. };
    10.  
    11. MyWidget::MyWidget(QWidget *parent) : QWidget(parent)
    12. {
    13. setFixedSize(500, 450);
    14.  
    15. QFile file("test.php");
    16. file.open(IO_Raw);
    17.  
    18. //QString buff;
    19.  
    20. file.close();
    21. }
    22.  
    23. int main(int argc, char *argv[])
    24. {
    25. QApplication app(argc, argv);
    26. MyWidget widget;
    27. widget.show();
    28.  
    29. return app.exec();
    30. }
    To copy to clipboard, switch view to plain text mode 

    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?
    Last edited by jacek; 29th November 2007 at 22:14. Reason: changed [qtclass] to [code]

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: IO_Raw unrecognized???

    Could you post the first error you get? Aren't you mixing Qt3 and Qt4?

  3. #3

    Default Re: IO_Raw unrecognized???

    Here is the error...

    Qt Code:
    1. main.cpp:16: error: `IO_Raw' undeclared (first use this function)
    To copy to clipboard, switch view to plain text mode 

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

  4. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: IO_Raw unrecognized???

    I'm using Qt 4 only as far as I know - at least thats all I installed.
    but you are using Qt3 headers.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: IO_Raw unrecognized???

    Quote Originally Posted by Hockey View Post
    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.

Similar Threads

  1. Handcoder's IDE for Qt
    By magland in forum Qt-based Software
    Replies: 55
    Last Post: 7th September 2007, 15:09

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.