Skip navigation.
Home
The QNX Community Portal

View topic - How to start or open chanel /dev/con1 to Qt-gui app???

How to start or open chanel /dev/con1 to Qt-gui app???

Isn't the name clear?

How to start or open chanel /dev/con1 to Qt-gui app???

Postby Dezintegrator » Fri Dec 20, 2013 9:58 am

Hi, I use QNX Neutrino 6.5.0.
I make Qt-gui application, which start a console-process. App can read all data available from the standard or error
output of console and write data to the form. Also I can to write a command on app-form, and send command to console.
My application work with "sh", but don't work with "/dev/con1".
How can I to start "dev/con1" in my application ?
An example, how my app work with "sh":
source file;
//----------------------------------------------------------------------------------------------
Code: Select all
proc = new QProcess; //sh - process
....
//Then clicked on Enter-key, command(*cmd) send in this function
func (QString *cmd)
{
QString *str = new QString;
*str = "sh " + *cmd; 
proc->start(*str, QIODevice::ReadWrite);
}

//-------------------------------------------------------------------------------------------
Dezintegrator
New Member
 
Posts: 1
Joined: Thu Dec 12, 2013 6:31 am

Re: How to start or open chanel /dev/con1 to Qt-gui app???

Postby maschoen » Fri Dec 20, 2013 7:04 pm

I'm sure I don't understand your problem, but /dev/con1 is created with the driver /sbin/devc-con.

Hmm, here's a second guess. You telnet in and use sh and you get the output, but if you run on the console with sh you don't see anything. That's because Qt takes over the video. So you can't do it. You could redirect the output somewhere else if you like.
maschoen
QNX Master
 
Posts: 2644
Joined: Wed Jun 25, 2003 5:18 pm

Re: How to start or open chanel /dev/con1 to Qt-gui app???

Postby Thunderblade » Tue Jan 07, 2014 3:58 pm

Dezintegrator wrote:Hi, I use QNX Neutrino 6.5.0.
I make Qt-gui application, which start a console-process.

That's an interesting point. I'm sure it works under Linux because there is a "desktop window manager". So what are you trying to achieve? Are you starting the console together with some command line utility? I think what you are looking for is something like "pterm" under Photon? I'm not a Qt expert, but Photon has a "console widget" and inside it can start a shell. At least I think that's what "pterm" does.
Thunderblade
Senior Member
 
Posts: 487
Joined: Thu Apr 07, 2005 11:52 am


Return to GUI Programming

Who is online

Users browsing this forum: No registered users and 2 guests