passing multiple options to qterminal
-
Could somebody please verify my code ?
I am trying to instruct qterminal to execute "bluetoothctl help".
I cannot get expected result , actually no results at all.
And no errors either.Reading qterminal manual does no tell how to pass "options" to the command , hence I may be
coding something which cannot be done by qterminal.Thanks
processTERMINAL = new QProcess(); QString exec = "qterminal"; QStringList params;
this works as expected
/ params = QStringList()<<"-e"<<"bluetoothctl";this does not
params = QStringList()<<"-e"<<"bluetoothctl" << "-e" << "help";qDebug() <<"params " << params;
// processTERMINAL->start(exec,QStringList()<<arguments);
processTERMINAL->start(exec,params); if(processTERMINAL->waitForStarted())
-
Could somebody please verify my code ?
I am trying to instruct qterminal to execute "bluetoothctl help".
I cannot get expected result , actually no results at all.
And no errors either.Reading qterminal manual does no tell how to pass "options" to the command , hence I may be
coding something which cannot be done by qterminal.Thanks
processTERMINAL = new QProcess(); QString exec = "qterminal"; QStringList params;
this works as expected
/ params = QStringList()<<"-e"<<"bluetoothctl";this does not
params = QStringList()<<"-e"<<"bluetoothctl" << "-e" << "help";qDebug() <<"params " << params;
// processTERMINAL->start(exec,QStringList()<<arguments);
processTERMINAL->start(exec,params); if(processTERMINAL->waitForStarted())
-
@AnneRanch
I am trying to instruct qterminal to execute "bluetoothctl help".
Presumably you want
params = QStringList()<<"-e"<<"bluetoothctl help";
@JonB Yes, your assumption is correct ...and it does not work ,,,been there , done that
-
@JonB Yes, your assumption is correct ...and it does not work ,,,been there , done that
@AnneRanch
Guessing from https://github.com/lxqt/qterminal/blob/master/src/main.cpp, eitherparams = QStringList()<<"-e"<<"bluetoothctl help"; params = QStringList()<<"-e"<<"bluetoothctl" << "help";
may work just as well, because the author likes the latter. So long as you have tried both those it's not your command-line that is at issue.
-
@AnneRanch
Guessing from https://github.com/lxqt/qterminal/blob/master/src/main.cpp, eitherparams = QStringList()<<"-e"<<"bluetoothctl help"; params = QStringList()<<"-e"<<"bluetoothctl" << "help";
may work just as well, because the author likes the latter. So long as you have tried both those it's not your command-line that is at issue.
@JonB said in passing multiple options to qterminal:
params = QStringList()<<"-e"<<"bluetoothctl help";
params = QStringList()<<"-e"<<"bluetoothctl" << "help";These are all of my attempts to make it work...
What is really frustrating - there are no progress / error codes -
the QProcess starts but there is obviously no execution of the arguments...params = QStringList()<<"-e"<<"bluetoothctl"; //params = QStringList()<<"-e"<<"bluetoothctl" << "-e" << " help"; //params = QStringList()<<"-e"<<"bluetoothctl help"; //params = QStringList()<<"-e"<<"bluetoothctl" << "help";
I did post my inquiry in "qterminal" forum - waiting for reply....
Irregardless if I can make it work - I am still working on how to actually access the "window "
created . Again - most people expect to have single process question and this is not
a single issue - it has to be solved as a collection of systems / processes etc.And I am reluctant to post in half a dozed forums just to solve ONE process.
. -
@JonB said in passing multiple options to qterminal:
params = QStringList()<<"-e"<<"bluetoothctl help";
params = QStringList()<<"-e"<<"bluetoothctl" << "help";These are all of my attempts to make it work...
What is really frustrating - there are no progress / error codes -
the QProcess starts but there is obviously no execution of the arguments...params = QStringList()<<"-e"<<"bluetoothctl"; //params = QStringList()<<"-e"<<"bluetoothctl" << "-e" << " help"; //params = QStringList()<<"-e"<<"bluetoothctl help"; //params = QStringList()<<"-e"<<"bluetoothctl" << "help";
I did post my inquiry in "qterminal" forum - waiting for reply....
Irregardless if I can make it work - I am still working on how to actually access the "window "
created . Again - most people expect to have single process question and this is not
a single issue - it has to be solved as a collection of systems / processes etc.And I am reluctant to post in half a dozed forums just to solve ONE process.
. -
No, it does not work from terminal, hence the problem is in qterminal itself. I think it is time to abandon qterminal....
-
@AnneRanch
Ultimately if you get it going it will behave the same as your xterm attempt, because you are still running a terminal.@JonB
I fully realize that - but this "native window" exists physically and I should be able to access it.
As I said - this is not a single process problem - now the multiple options is identified - it is time to
concentrate on access to "NATIVE WINDOW"... -
No, it does not work from terminal, hence the problem is in qterminal itself. I think it is time to abandon qterminal....
@AnneRanch said in passing multiple options to qterminal:
No, it does not work from terminal
Is that 'Shell No. 1' terminal the result of
qterminal -e bluetoothctl
? Doesn't that mean it does work from a terminal? -
@AnneRanch said in passing multiple options to qterminal:
No, it does not work from terminal
Is that 'Shell No. 1' terminal the result of
qterminal -e bluetoothctl
? Doesn't that mean it does work from a terminal?@mchinand Please read the title and the last post - it about passing multiple options .....and that does not work
-
@JonB
I fully realize that - but this "native window" exists physically and I should be able to access it.
As I said - this is not a single process problem - now the multiple options is identified - it is time to
concentrate on access to "NATIVE WINDOW"...@AnneRanch said in passing multiple options to qterminal:
but this "native window" exists physically and I should be able to access it.
it is time to concentrate on access to "NATIVE WINDOW"...I have tried to explain several times that you will not be able to access the output you see in a terminal --- whether from xterm or qterminal --- from an external program, such as your Qt application. That output goes into the terminal's output window and is not available to "see" or "read" elsewhere, even though you would like it to be. But I will leave you to your investigations.
When you come to the same conclusion you have my reply at https://forum.qt.io/topic/139374/another-xterm-qtextedit-issues/10 which shows what you will need to do if you do wish to access the output from
bluetoothctl
and has code showing how to do it and what the final output will look like.