Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Using QFile on a open linux file descriptor
QtWS25 Last Chance

Using QFile on a open linux file descriptor

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 3.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DBoosalis
    wrote on last edited by
    #1

    I have a feeling some one must have asked this before but darn if I could find it. I have File Descritpor (int value) . Can I convert that to a QFile. I see QFile::open(int OpenMode); but this file is already open. Anyone know if it is possible, and if it is possible can you tell me how

    Any advise appreciated.

    -David

    ps this is with QT 4.8

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      There are several obvious QFile::open() overloads taking FILE* integer file descriptors

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DBoosalis
        wrote on last edited by
        #3

        Yes, but do they assume the file desciptor is not open already. Because I tried doing a QFIle open but the readyRead signal never gets emitted when I know data has been written to the file

        1 Reply Last reply
        0
        • C Offline
          C Offline
          ChrisW67
          wrote on last edited by
          #4

          QFile won't do that even for files entirely managed by Qt.
          http://qt-project.org/doc/qt-4.8/qfile.html#signals

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved