Signals and slots or whatever
-
@VRonin So the application is made to run a camera that detects objects. For instance, you can shoot a live video feed, then create a "signature" by selecting the signature option, the frame freezes, and you can use your mouse to highlight an area on the video feed, lets say a red rubber ball. Then the application stores that data and any time a red rubber ball comes into the live video feed, the application tracks it. The application is capable of storing up to 7 different signatures. Hence the m_palette[i]. If you want to read more on it, the camera is called PixyCam 2 and the application it comes with is called PixyMon.
What I have done here and for the last 2 weeks is tried to take the open source application code that is built on Qt, and add a textBrowser that can display the current signature RGB code. I have found the data variable for the first signature (m_palette[0]). But the application is very complex for a beginner like me and frankly, I thought it would be easier of a task so that I can continue with my project.
So when I 'make changes' I am just setting a new Signature 1 on the application as it runs.
-
@VRonin You are going to hate me Ronin. I have searched all over the internet, I am 99% sure that Qt Creator does not have a stack trace. There are a bunch of forums saying I have to add a huge amount of code to the debug library in order to create a stack trace and I don't think I am skilled enough to do this.
Here is the Application Output if that is what you mean by stack trace, but it does not seem helpful:
09:51:55: Starting C:\Users\rodriguez\Desktop\pixy2-master\src\host\build-pixymon-Desktop_Qt_5_2_1_MinGW_32bit-Debug\debug\PixyMon...
ASSERT: "false" in file ..\pixymon\cccmodule.cpp, line 155
QObject::killTimers: timers cannot be stopped from another thread
09:52:01: C:/Users/rodriguez/Desktop/pixy2-master/src/host/build-pixymon-Desktop_Qt_5_2_1_MinGW_32bit-Debug/debug/PixyMon exited with code 3The Q_ASSERT(false); did work. In fact, it worked instantly. It closes the program as soon as the program opens and loads without me pressing anything.
Honestly, I did not think that such a simple thing as printing a value to the UI would be so difficult. I'm baffled. Is there any way around this that you can think of. I tried to make a global variable to carry the data of m_palette[0] to the Mainwindow.cpp but obviously even that is drawing an error…
-
@jrod2much said in Signals and slots or whatever:
I am 99% sure that Qt Creator does not have a stack trace.
The one in the red rectangle is the stack trace
@jrod2much said in Signals and slots or whatever:
I did not think that such a simple thing as printing a value to the UI would be so difficult.
It is not. Sorry to be brutal but it's your inexperience with the language and the tools that is making this difficult. The good news is that once you do it once and you understand it, the next time it will be a breeze
-
-
@jrod2much said in Signals and slots or whatever:
5.2 is the only one that works
Nevermind then, focus on the main point i.e. the screenshot of the kit you are actually using
-
@jrod2much said in Signals and slots or whatever:
@VRonin :( On the pixyMon website, the forum people said that 5.2 is the only one that works, I could try other versions but it would take me hours. I don't mind doing that though if you think it would be lucrative.
If the authors found that Qt 5.2 is most stable, then it's best to stick to Qt 5.2.
An important point from http://cmucam.org/projects/cmucam5/wiki/Building_PixyMon : The authors used the MinGW compiler, not the MSVC compiler. So, close Qt Creator, launch MaintenanceTool.exe (found in the root folder of your Qt installation) and:
- Remove (Uninstall) all the MSVC-based versions of Qt.
- Add (Install) Tools > MinGW 4.8 (this is the version of MinGW that goes with Qt 5.2)
Some questions for sanity checks:
- How did you install Qt in the first place?
- How/Why did you create the "Desktop" and "Qt Version 1" kits?
-
@VRonin Here is a picture of the correct kit. The breakpoints are still not working. @JKSH This picture was taken after I followed the steps you gave me.
I downloaded Qt using the Qt installer, but when I first tried to build the project, the default installation "Tools" was not enough at first so I experimented by downloading many different versions. As for the "Desktop" and "Qt version" kits, if I could tell you how I did it or even why, I wouldn't be on this forum with the type of questions I've been asking Lmao.
Here is the caution error message attached to the kit if it is helpful:
-
@jrod2much said in Signals and slots or whatever:
I downloaded Qt using the Qt installer, but when I first tried to build the project, the default installation "Tools" was not enough at first so I experimented by downloading many different versions. As for the "Desktop" and "Qt version" kits, if I could tell you how I did it or even why, I wouldn't be on this forum with the type of questions I've been asking Lmao.
Fair enough :)
Here is the caution error message attached to the kit if it is helpful:
It looks like the auto-detector glitched and picked CDB to your debugger. CDB doesn't work with MinGW, I think.
- Select your MinGW kit (just like your screenshot) and click Clone.
- Change the Debugger to GNU GDB (if it doesn't appear, go to the Debuggers tab and add it -- it should be in the same folder as your MinGW compiler)
- Set the C compiler to MinGW 4.8 too (I don't think this is strictly needed, but it can't hurt)
- Give your kit a name, save it, then make it Default.
- Close Qt Creator.
- Go to your project folder and delete the *.pro.user file.
- Launch Qt Creator again and open your project. Make sure you use your new kit from Step #4.
-
Alright so a few things have happened. I followed all the sets but on step 2, I did not find any debugger saying exactly GNU GDB. Here is what I set the debugger to, for sake of trying anything remotely close:
Now, the program is actually just crashing which has never happened before (This is happening without any breakpoints):
Do I have to download the GNU GDB? -
@jrod2much said in Signals and slots or whatever:
I did not find any debugger saying exactly GNU GDB. Here is what I set the debugger to, for sake of trying anything remotely close:
Yep, you've correctly picked GNU GDB.
Now, the program is actually just crashing which has never happened before (This is happening without any breakpoints):
What do you get when you run the debugger? (Don't click the Run arrow. Instead, click the button below it, which is the Run arrow plus a with the Bug icon -- see #4 at http://doc.qt.io/qtcreator/creator-quick-tour.html )
-
@jrod2much said in Signals and slots or whatever:
What should be my next step?
Make the interpreter a QObject if it's not already and declare a signal identical to the one in CccModule.
Now wherever the interpreter creates the CccModuleconnect()
the 2 signals togetherThe following step is finding out how interpreter gets created (by MainWindow?) it might be tricky as it's in a secondary thread but try and have a look