Discussion Board

Results 1 to 6 of 6
  1. #1
    Nokia Developer Expert jkyro's Avatar
    Join Date
    Feb 2004
    Posts
    4
    Hi!

    I'm creating an application for Linux Desktop that uses the standard input as a communications medium. It needs to work also when stdin is redirected from a file or a named pipe. To be more specific, the project is a tool for testing another app so I need to integrate it with other command line tools.

    I'm currently using QSocketNotifier to detect when there is input and QFile is used to open stdin for reading.
    While waiting for input I still need to keep the event loop running so I cannot use waitForReadyRead().

    My approach works pretty well with no redirection and the case where the input comes from a file. If there is a pipe in between the expected behavior is that when something it written to the pipe, the app reads and processes the input and waits for further input. However, after the first input has been read, the socket notifier keeps emitting activated() signal even though there is no data to be read.

    For some reason QFile::readyRead doesn't work at all. Is there a way this kind of thing could work?

  2. #2

  3. #3
    Nokia Developer Expert jkyro's Avatar
    Join Date
    Feb 2004
    Posts
    4
    From that I'm only reading that it's not possible with QT. Is it really so?

  4. #4
    Nokia Developer Moderator divanov's Avatar
    Join Date
    Oct 2009
    Posts
    4,326
    Quote Originally Posted by jkyro View Post
    From that I'm only reading that it's not possible with QT. Is it really so?
    I didn't find any single mention of QuickTime following the link.

  5. #5
    Nokia Developer Expert jkyro's Avatar
    Join Date
    Feb 2004
    Posts
    4
    Sorry, Qt. Typos aside the information content on the actual subject of the thread so far is and seemingly continues to be zero.

  6. #6
    Nokia Developer Champion danhicksbyron's Avatar
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209
    Keep in mind that C++ sits underneath Qt. You should in theory be able to use "native" C++ interfaces.

Similar Threads

  1. Can't switch numeric input to text input in RichTextEditor
    By mobilepig in forum Symbian User Interface
    Replies: 2
    Last Post: 2008-01-03, 05:14

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved