Questions tagged [qfile]

A QFile is a class from the Qt Toolkit which provides an interface for reading from and writing to files.

QFile is an I/O device for reading and writing text and binary files and resources. A QFile may be used by itself or, more conveniently, with a QTextStream or QDataStream.

The official Qt documentation can be found here for Qt 4.8 and here for Qt 5.

305 questions
-1
votes
1 answer

How to read unicode from a file and display the data in a QTextEdit?

I want to read unicode from file and display the corresponding data in a QTextEdit.Please give me some suggestions.
QtUser
  • 185
  • 2
  • 2
  • 12
-1
votes
2 answers

Delete file in directory with extension

Hi I'm trying to iterate through directories and remove files with the extension "~" here is my code QString path = "/home/brett/sweetback"; QDirIterator it(path, QDirIterator::Subdirectories); while (it.hasNext()) { …
Brett
  • 376
  • 7
  • 24
-1
votes
1 answer

Transmitting an exe file via network in Qt

I am trying to create a Remote compiling system in Qt. What I am trying to do is to get the C/C++ source from the client and calling the locally available GCC via QProcess on the server, create the exe file and then transmit the exe back to the…
Rahul De
  • 393
  • 3
  • 14
-2
votes
4 answers

"Unhandled exception at 0x000007FEFD5D7C8A (ole32.dll) in myprogram.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF"

I'm trying to use QfileDialog (as a static fct) for the user to select and read a ".txt" file, as follow: void VisOCMConfig::readNmbTiles() { QString m_findFile; m_findFile = QFileDialog::getOpenFileName(0, tr("Open TextFile"), …
-3
votes
1 answer

How to append text to a text file in Qt?

I would like to be able to append text at the end of an existing file. This means the file should not be overwritten when the new text is added to it. This is how I would do that in plain C++: ofstream fout("filename.txt", ios::app) Here is how I…
louis cage
  • 1
  • 1
  • 2
1 2 3
20
21