15,895,958 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Salvatore Terress (Top 18 by date)
Salvatore Terress
13hrs ago
View
OK, these comments are not is posted sequence.
Can I stay with the OP ?
I really do not want to get into "why not inheritance".
Kindly allow me to fix this first, using resources I have.
If that is not OK....
Salvatore Terress
13hrs ago
View
Now explain why SettingsDialog is NOT part of the "main window" ?
Should that be "not part of the base class" ?
I am not being picky, but I do prefer using C++ terminology when appropriate.
Salvatore Terress
14hrs ago
View
OK, allow me to start from scratch.
When I create an instance of the primary/ base class and DO NOT
specify "thIs" or ANY pointer , hence use default NULL pointer - that is OK?
Salvatore Terress
26-Feb-24 14:06pm
View
This is no longer a simple problem.
I am moving it to "discussions".
SORRY.
Salvatore Terress
25-Feb-24 20:07pm
View
I did verify that "dbus.h" exist in my system.
As I( suspected - "dbus.h" header is a "wrapper" for many additional "incliude"......
and it fails to find very first
#include <dbus dbus-arch-deps.h="">
I went back to the source in github and cannot find dbus-arch-deps there
T tried to bypass #include <dbus dbus-arch-deps.h=""> but cannot in read only system file.
I may have to load my own copy of "dbus.h" so I can
, temporary, skip the "missing" header...
Salvatore Terress
24-Feb-24 12:29pm
View
No, I tried to install the first package mentioned in the doc
File Packages
/usr/include/core/dbus/dbus.h libdbus-cpp-dev
/usr/include/dbus-1.0/dbus/dbus.h libdbus-1-dev
Let me try the other....
here it is !!
nov25-1@nov251-desktop:/usr/include/dbus-1.0/dbus$ ls
dbus-address.h dbus-macros.h dbus-protocol.h dbus-threads.h
dbus-bus.h dbus-memory.h dbus-server.h dbus-types.h
dbus-connection.h dbus-message.h dbus-shared.h
dbus-errors.h dbus-misc.h dbus-signature.h
dbus.h dbus-pending-call.h dbus-syntax.h
nov25-1@nov251-desktop:/usr/include/dbus-1.0/dbus$
and after modification of the original "include" I now have "dbus.h"...
Thanks
Salvatore Terress
24-Feb-24 11:55am
View
This is getting confusing
I look in /usr/include/core/dbus/dbus.h and found no such reference
I tried to install libdbus-cpp-dev in Ubuntu but "no such package..."
Salvatore Terress
24-Feb-24 11:12am
View
OK. I am making it too stupid - I can "include " it just like any other header.
I probably be netter off if I just copy it to my directory structure...
Salvatore Terress
24-Feb-24 9:17am
View
Deleted
Been there... still not sure how to LINK to dbus.h header file. I need it for the entire project, not just for single .cpp
Salvatore Terress
18-Feb-24 19:52pm
View
this is turning into "try this..."
( I should have posted this in "discussion"... but then I would get
" do not post Qt questions here..." )
here is the QProcess (!) implementation , obviously wrong...
it does what it should - just "echo" the command line
QProcess *QP = new QProcess();
QP->start(" echo q | sudo -S hcitool info 98:D3:31:F8:39:33 ") ;
if(QP->waitForStarted())
{
text = "SUCCESS started";
ui->textEdit->append(text);
qDebug() << text;
if(QP->waitForReadyRead())
{ text = "SUCCESS waitForReadyRead() OK ";
ui->textEdit->append(text);
qDebug() << text;
text = QP->readAllStandardOutput();
ui->textEdit->append(text);
qDebug() << text;
}
}
else
{
text = " FAILED start ";
}
qDebug() << text;
return;
Thanks for all replies and since
I am not allowed to ask Qt questions
CASE CLOSED
Salvatore Terress
18-Feb-24 16:00pm
View
Here is my attempt to use "popen"
char s[5000];
char cmd[64]="echo q | sudo -S hcitool info 98:D3:31:F8:39:33";
FILE* pip=popen(cmd,"r");
fgets(s,5000,pip);
qDebug() << s;
return;
result:
I no longer get "connected" response from remote Bluetooth device
I get "disconnected" after few seconds
my "output" is limited to ONE line
[sudo] password for nov25-1: Requesting information ...
using "system" it took over 20 seconds for completion (expected _)
it definitely looks as "popen" terminates BEFORE remote device is finished responding.
not sure how to fix this , perhaps I have to give up and use QProcess
Salvatore Terress
18-Feb-24 12:51pm
View
..so I cannot avoid to use "file "
and I can use both " | > "...
if "system" has no knowledge of "result"
how will it have knowledge if I use QFile resultFile;?
" | > resultFile "
Salvatore Terress
18-Feb-24 8:28am
View
Are you saying that "QString result" is a file , hence I need to treat (read) it as a file?
OK I did redirect to this "file"...and than lost the output to stdout AKA console..
but why using "| > " also removed the output to console?
Salvatore Terress
17-Feb-24 19:36pm
View
...the question is about how to process "system" call...
(I want to learn something as I code...)
I do not know how (want) to option QtProcess with such complex setting.
Besides "system" is more KISS (IMHO)
Salvatore Terress
24-Jan-24 15:02pm
View
I found this
QMetaMethod metaMethod = sender()->metaObject()->method(senderSignalIndex());
I really do not know HOW it works, but it manages to access senderSignalIndex , but the index returned does not make sense... so part of the problem is solved.. I will RTFM about QMetaMethod next...
Salvatore Terress
23-Jan-24 11:29am
View
Just update
I have this (working( example of single list I will try to adapt to "two level " list array
// test
QStringList fonts = { "Arial", "Helvetica", "Times" };
for (int i = 0; i < fonts.size(); ++i)
{
cout << fonts.at(i).toLocal8Bit().constData() <
Salvatore Terress
23-Jan-24 10:22am
View
Unfortunately that is not what I need - I need size , # , of members in subarray.
That is why I asked if my array definition is correct.
for(int TEST = 0; TEST < 5; TEST++)
{
text = " test ARRAY size TEST ";
text += QString::number (TEST );
text += " ";
text += QString::number (list_array[TEST][0].size());
text += " sizeof ";
text += QString::number (sizeof (list_array[TEST][0]));
qDebug() << text;
}
Output of code above:
" test ARRAY size TEST 0 39 sizeof 8"
" test ARRAY size TEST 1 49 sizeof 8"
" test ARRAY size TEST 2 34 sizeof 8"
" test ARRAY size TEST 3 49 sizeof 8"
" test ARRAY size TEST 4 39 sizeof 8"
Salvatore Terress
12-Jan-24 16:07pm
View
I do not need grep to find these symbols...
I agree it may be something as Doxygen
and if I know that I will be able to find what is their function.
Show More