|
I've seen this or something similar before - I believe it was because I had the .rc file open in an editor window.
|
|
|
|
|
That may have been it - I'll have to try it when I get back to the other machine. Usually my experience has been that the graphical dialog editor closes when I want to open the source of the resource file.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
Did you try to open this dialog from the Resource View?
|
|
|
|
|
yes. The dialog was up in the graphical editor. Prior post may have hit on something... will have to try it later.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
I tried a few times by opening the resource file, etc. But each time I go back to the graphical dialog editor, it displays correctly.
Things that make you go hmm.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
Message Closed
modified 15-May-23 19:07pm.
|
|
|
|
|
Didn't we already cover this? How do I pass command to system calll as variable? In particular see popen(3) - Linux manual page I still think that QProcess is the way to go if you're in QT land. You seem to be having difficulties getting that working - my advice would be to write as small a program as you can that uses Qprocess to do something like a directory listing, and get that working, then integrate what you learned from that to get it working in your main project.
If you insist, though, you should be able to redirect output, just like you would from the terminal command line e.g.
const char *command = "rfkill list > textEdit";
system(command)
system("rfkill list > textEdit"); In this instance, I don't see the value in constructing a QString just to then re-format it as a C string for the system command, and then calling the QString destructor.
Keep Calm and Carry On
|
|
|
|
|
Message Closed
modified 15-May-23 19:07pm.
|
|
|
|
|
The tee command splits output the man page states
SYNOPSIS
tee [OPTION]... [FILE]... For every FILE you add to the end of the command, tee will direct stdout to the given file. So I think you want
rfkill list | tee tempFile This will send output to tempFile (in the current working directory) and send the output to the screen as well. You can test this from your terminal session.
Keep Calm and Carry On
|
|
|
|
|
|
Message Closed
modified 15-May-23 19:07pm.
|
|
|
|
|
11:19:00: Running steps for project HCI_VERSION_622...
11:19:00: Configuration unchanged, skipping qmake step.
Boilerplate startup. As noted, no changes detected, the "qmake" step has been skipped
11:19:00: Starting: "/usr/bin/make" -j4 starting /usr/bin/make with 4 jobs (-j4)
/home/qy/Qt/6.2.2/gcc_64/bin/qmake -o Makefile ../HCI_VERSION_622/HCI_VERSION_622.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug qmake constructs a Makefile
rm -f libHCI_VERSION_622.so.1.0.0 libHCI_VERSION_622.so libHCI_VERSION_622.so.1 libHCI_VERSION_622.so.1.0 remove (rm) outdated project target
g++ -Wl,-rpath,/home/qy/Qt/6.2.2/gcc_64/lib -Wl,-rpath-link,/home/qy/Qt/6.2.2/gcc_64/lib -shared -Wl,-soname,libHCI_VERSION_622.so.1 -o libHCI_VERSION_622.so.1.0.0 main.o mainwindow_hci_v_622.o moc_mainwindow_hci_v_622.o /home/qy/Qt/6.2.2/gcc_64/lib/libQt6Widgets.so /home/qy/Qt/6.2.2/gcc_64/lib/libQt6Gui.so /home/qy/Qt/6.2.2/gcc_64/lib/libQt6Concurrent.so /home/qy/Qt/6.2.2/gcc_64/lib/libQt6Core.so -lpthread -lGL I think that's all one command line : run g++ to create the target
ln -s libHCI_VERSION_622.so.1.0.0 libHCI_VERSION_622.so
ln -s libHCI_VERSION_622.so.1.0.0 libHCI_VERSION_622.so.1
ln -s libHCI_VERSION_622.so.1.0.0 libHCI_VERSION_622.so.1.0 create some soft links, presumably needed for link name resolution for other projects that might use this library
11:19:02: The process "/usr/bin/make" exited normally.
11:19:02: Elapsed time: 00:02. Boilerplate successful completion of project creation
Keep Calm and Carry On
|
|
|
|
|
Message Closed
modified 15-May-23 19:07pm.
|
|
|
|
|
The -Wl,... arguments to g++ are passed on the the linker. For details of the rpath and rpath-link arguments see here: Using LD, the GNU linker - Options
Member 14968771 wrote: -shared -Wl,-soname,libHCI_VERSION_622.so.1 -o libHCI_VERSION_622.so.1.0.0 main.o mainwindow_hci_v_622.o moc_mainwindow_hci_v_622.o
-shared : create a shared runtime -necessary for producing a shared library (DLL in windows-speak)
-Wl,-soname,libHCI... : see above document re -soname linker option
The .o files are the object files to put in the shared library
You are correct about the other libraries. They get picked up by rpath and rpath-link, so that when you use then libHCI_VERSION_6622 library, you do not have to add them to the link command line
Keep Calm and Carry On
|
|
|
|
|
Message Closed
modified 15-May-23 19:07pm.
|
|
|
|
|
First, make sure you're creating a debug build. Whatever IDE you're using should have a Build or Compile config section, so take a look and make sure that's set. Your IDE should have a built in link to the debugger, so just run the program in the debugger. When the error is thrown, the debugger should stop the program and allow you to examine the state of the program. If you need to use the command line, here's an example to help you get started:
$ cat bad_alloc.cpp
int main()
{
size_t lim = 2;
while(true)
{
int *arr = new int[lim];
delete[] arr;
lim *= 2;
}
return 0;
}
$
$
$ g++ -m32 -ggdb bad_alloc.cpp -o bad_alloc
$
$ gdb bad_alloc
Reading symbols from bad_alloc...
(gdb) run
Starting program: /home/ebacon/tmp/c++/bad_alloc
terminate called after throwing an instance of 'std::bad_array_new_length'
what(): std::bad_array_new_length
Program received signal SIGABRT, Aborted.
0xf7fce559 in __kernel_vsyscall ()
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.32-10.fc33.i686 libgcc-10.3.1-1.fc33.i686
(gdb)
(gdb) bt
(gdb)
(gdb)
(gdb) frame 8
8 int *arr = new int[lim];
(gdb)
(gdb)
(gdb) p lim
$1 = 536870912
(gdb) quit
A debugging session is active.
Inferior 1 [process 3076940] will be killed.
Quit anyway? (y or n) y
$
Hopefully, that's enough to get you started. If you need more, then Google is your friend.
Keep Calm and Carry On
|
|
|
|
|
Message Closed
modified 15-May-23 19:07pm.
|
|
|
|
|
The docs are pretty clear: QProcess Class | Qt Core 5.15.8 Try
QProcess::execute("hcitool", "-i chio scan --flush");
since hcitool is part of the bluez package, it almost certainly uses the bluez library to do its work. If you can get hold of the source code, you should be able to look through it and find out why they make it work the way you expect it to.
Keep Calm and Carry On
modified 18-Jan-22 17:58pm.
|
|
|
|
|
I am using WebView2 for displaying html contents in my win32 application. I have parent.html in which I am providing reference of child.html like -
<frameset id="myFrmset">
<frame id="myFrm" name="frmContent" src="child.html"></frame>
</frameset>
In child.html :
<button id="samplebutton" onclick="postmessagetocode()">clickhere</button>
<script>
function postmessagetocode() {
window.chrome.webview.postmessage('clickSample');
}
</script>
In my c++ code I am loading parent.htm and want to get above message 'clickSample' in
m_webView->add_WebMessageReceived .
Issue that I am facing : by doing like above I am not getting this message in code. If I post any message from parent.html then I can get it. But if I do like from child.html then it never come to c++ code.
Is there the way to do so?
Is it something like I need to catch the message at parent.html first then post again to c++?
Thanks.
|
|
|
|
|
I have three controls in my Modal Dialog there are EDITTEXT and the Variables I am using are CString
After the modal Dialog Box comes in my OnOk I do an UpdateData(TRUE) the data I enter is 2E000 however when it is returned between every character there is a Null so it would be in hex 32004500300030
this happens with all the varaible
thanks
|
|
|
|
|
One word. UNICODE
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Have to change the settings in the VS property page ?
|
|
|
|
|
It depends what you are trying to do with the content of the string. The CString is using Unicode, so presumably, the entire application is also. And you cannot (easily) change one part of the application without affecting other elements.
|
|
|
|
|
|
Yes that will work fine, but you really need to consider why your application is using Unicode in the first place.
|
|
|
|