Signals and slots or whatever
-
Tools->options->Kits->select the kit that you are using
Can you take a screenshot of the page?
-
The fact that it says "no compiler" and you are compiling makes me think you didn't select the correct kit. If I had to bet I'd say you are using the MinGW kit.
P.S.
Qt 5.2 has not been supported for a long while. Any reason why you are not updating? -
-
@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
-
@VRonin Alright so I found different data to connect to the textBrowser, and after many attempts and much research, I am still unable to do it. Here are update images:
I don't know the coding lingo, but I' think I found the creation of the render class object or whatever. It is in this Interpret class that is then made an object in the mainwindow
I am showing you any pieces of code that could possibly be related to what I am trying to do. Unfortunately, there are no examples, tutorials, or explanations on how to connect to a textBrowser, no matter where I search on the internet. Most tutorials about connections lazily explain elementary connections between buttons and sliders that are preformatted anyway. I would like to give it one more try before changing my direction from the possibilty of a UI that can display data values to just using printf functions and continuing my project. If you see any way you can help me, I would greatly appreciate it.
-
@jrod2much said in Signals and slots or whatever:
Most tutorials about connections lazily explain elementary connections
connect() always work the same way no matter what you're connecting to what. You can't expect tutorials for everything.
What is the problem now?
It doesn't compile?
Are your slots in "slots" section and signals in "signals" section in your classes? Are those classes derived from QObject? -
@jsulm Yes connect() always works the same but what I mean by lazy tutorials is that many of the tutorials show how to use preformatted connect()'s. In my case, I have create every aspect of the connection. I don't know what goes in the four arguments of the connect and when I try to use the m_render for the first argument, it does not recognize.
-
jsulm Lifetime Qt Championreplied to jrod2much on 2 Oct 2018, 12:22 last edited by jsulm 10 Feb 2018, 12:26
@jrod2much said in Signals and slots or whatever:
preformatted connect()
What is this?
As I said: it is always the same.
connect(senderObject, signal, receiverObject, slot);
There is really nothing special.
Is Renderer derived from QObject?
Is m_renderer a pointer?
Can you please post the error message you get? -
in the
connect(m_renderer
etc, the third argument (this
) is of typeMainWindow
, notQTextBrowser
so it can't work, you need to passm_ui->textBrowser
there.What's the full error the connect reports?
Post 42 of 71