Results 1 to 3 of 3

Thread: Use fstream with a QDialog

  1. #1
    Join Date
    Oct 2012
    Posts
    16
    Thanks
    9
    Platforms
    Windows

    Default Use fstream with a QDialog

    Hi
    I tried using ...
    Qt Code:
    1. ofstream myfile;
    To copy to clipboard, switch view to plain text mode 
    ... inside one private slot of my QDialog based class.
    I get the error...
    Qt Code:
    1. 'ofstream' was not declared in this scope
    To copy to clipboard, switch view to plain text mode 

    Is it possible to use STL libraries allong with Qt?
    I know i can use QFile but that is not my question.

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Use fstream with a QDialog

    It's "std::ofstream"
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    gtnoob (19th October 2012)

  4. #3
    Join Date
    Oct 2012
    Posts
    16
    Thanks
    9
    Platforms
    Windows

    Default Re: Use fstream with a QDialog

    arrrrg
    So obvious ... Thanks

Similar Threads

  1. Replies: 9
    Last Post: 25th March 2011, 22:22
  2. QDialog.exec() exiting without calling QDialog::accept()
    By doggrant in forum Qt Programming
    Replies: 3
    Last Post: 2nd February 2011, 12:35
  3. QFile -> std::fstream
    By bhs-ittech in forum Qt Programming
    Replies: 1
    Last Post: 9th June 2008, 11:02
  4. fstream open/close
    By mickey in forum General Programming
    Replies: 4
    Last Post: 13th October 2006, 13:23
  5. fstream -> stdout
    By zlatko in forum General Programming
    Replies: 11
    Last Post: 25th January 2006, 06:15

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.