Last.FM: Recently listened

Monday, November 05, 2007

Qt + Processes + I/O redirection

I had a look at QtEmu today, a Qt4 frontend for Qemu. The tool is really nice, however I missed an important feature: I would like to add arbitrary command line parameters for Qemu startup, because some of my requirements (serial I/O, disabling graphics support) are not met by typical frontends, because they are quite special.

I therefore added a new edit box to QtEmu enabling me to insert my parameters. However, nothing happened in my terminal and I wasn't able to see any output from Qemu. iMichael and I found out that the QProcess class used by QtEmu does send its standard input and output to its parent by default. The solution for output is easy: standard and error output streams can be redirected using the QProcess::setProcessChannel() method.

Redirecting input is a bit harder (but I needed it, because I'd like to interact with the Fiasco kernel debugger). There is no channel for writing to a QProcess in Qt4. However, some Trolltech developers already came up with a solution for interactive processes, which helped in our case, too.

1 comment:

Anonymous said...

[url=http://www.23planet.com]casinos online[/url], also known as agreed casinos or Internet casinos, are online versions of time-honoured ("pal and mortar") casinos. Online casinos ease gamblers to filch up and wager on casino games from guv to foot the Internet.
Online casinos for the most region command odds and payback percentages that are comparable to land-based casinos. Some online casinos involve on higher payback percentages in the function of gap supporter games, and some make known payout intimate audits on their websites. Assuming that the online casino is using an fittingly programmed unsystematic consolidate up generator, recount games like blackjack clothed an established game tabular edge. The payout proportion after these games are established on non-standard apt to the rules of the game.
Uncountable online casinos sublease or apprehension their software from companies like Microgaming, Realtime Gaming, Playtech, Supranational Sophistry Technology and CryptoLogic Inc.