Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Signals and slots or whatever
Qt 6.12 LTS is out! See what's new in the release blog

Signals and slots or whatever

Scheduled Pinned Locked Moved Unsolved General and Desktop
71 Posts 6 Posters 39.6k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J jrod2much

    @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.

    JKSHJ Offline
    JKSHJ Offline
    JKSH
    Moderators
    wrote on last edited by
    #39

    @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:

    1. How did you install Qt in the first place?
    2. How/Why did you create the "Desktop" and "Qt Version 1" kits?

    Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

    1 Reply Last reply
    3
    • J Offline
      J Offline
      jrod2much
      wrote on last edited by jrod2much
      #40

      @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.
      0_1538380476205_ea478f89-ecc7-42c0-b82c-159ab3fd4d61-image.png

      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:

      0_1538380936038_16febb11-1878-4612-b1f6-42b179591112-image.png

      JKSHJ 1 Reply Last reply
      0
      • J jrod2much

        @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.
        0_1538380476205_ea478f89-ecc7-42c0-b82c-159ab3fd4d61-image.png

        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:

        0_1538380936038_16febb11-1878-4612-b1f6-42b179591112-image.png

        JKSHJ Offline
        JKSHJ Offline
        JKSH
        Moderators
        wrote on last edited by
        #41

        @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.

        1. Select your MinGW kit (just like your screenshot) and click Clone.
        2. 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)
        3. Set the C compiler to MinGW 4.8 too (I don't think this is strictly needed, but it can't hurt)
        4. Give your kit a name, save it, then make it Default.
        5. Close Qt Creator.
        6. Go to your project folder and delete the *.pro.user file.
        7. Launch Qt Creator again and open your project. Make sure you use your new kit from Step #4.

        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

        1 Reply Last reply
        3
        • J Offline
          J Offline
          jrod2much
          wrote on last edited by jrod2much
          #42

          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:
          0_1538385651003_cf87e7ff-ac2f-47f1-b873-1a83844ac3eb-image.png

          Now, the program is actually just crashing which has never happened before (This is happening without any breakpoints):
          0_1538385699871_21be4ad3-2aa2-4191-9b0e-e018e34ca913-image.png
          Do I have to download the GNU GDB?

          JKSHJ 1 Reply Last reply
          0
          • J jrod2much

            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:
            0_1538385651003_cf87e7ff-ac2f-47f1-b873-1a83844ac3eb-image.png

            Now, the program is actually just crashing which has never happened before (This is happening without any breakpoints):
            0_1538385699871_21be4ad3-2aa2-4191-9b0e-e018e34ca913-image.png
            Do I have to download the GNU GDB?

            JKSHJ Offline
            JKSHJ Offline
            JKSH
            Moderators
            wrote on last edited by
            #43

            @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:
            0_1538385651003_cf87e7ff-ac2f-47f1-b873-1a83844ac3eb-image.png

            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):
            0_1538385699871_21be4ad3-2aa2-4191-9b0e-e018e34ca913-image.png

            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 )

            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

            J 1 Reply Last reply
            3
            • JKSHJ JKSH

              @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:
              0_1538385651003_cf87e7ff-ac2f-47f1-b873-1a83844ac3eb-image.png

              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):
              0_1538385699871_21be4ad3-2aa2-4191-9b0e-e018e34ca913-image.png

              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 )

              J Offline
              J Offline
              jrod2much
              wrote on last edited by
              #44

              @JKSH 0_1538387304604_fbb3e485-69a9-46a8-b74d-e1c7602c6964-image.png

              1 Reply Last reply
              0
              • J Offline
                J Offline
                jrod2much
                wrote on last edited by
                #45

                @JKSH Alright I fixed it, I had to copy a dll file to the executable file and BOOM. I finally got somewhere. @VRonin It seems like the interpreter code is the one that handles the parameter changes… What should be my next step?

                0_1538395209701_a7347f5c-881d-4faf-ad0f-70a9fdffcf37-image.png

                VRoninV 1 Reply Last reply
                0
                • J jrod2much

                  @JKSH Alright I fixed it, I had to copy a dll file to the executable file and BOOM. I finally got somewhere. @VRonin It seems like the interpreter code is the one that handles the parameter changes… What should be my next step?

                  0_1538395209701_a7347f5c-881d-4faf-ad0f-70a9fdffcf37-image.png

                  VRoninV Offline
                  VRoninV Offline
                  VRonin
                  wrote on last edited by
                  #46

                  @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 CccModule connect() the 2 signals together

                  The 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

                  "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                  ~Napoleon Bonaparte

                  On a crusade to banish setIndexWidget() from the holy land of Qt

                  VRoninV 1 Reply Last reply
                  3
                  • J Offline
                    J Offline
                    jrod2much
                    wrote on last edited by
                    #47

                    @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:
                    0_1538477163306_51c1562a-a99c-4069-99b4-e5697211dd24-image.png
                    0_1538477337855_ca3e47b9-7c89-4c5b-b74d-aa0b5397747d-image.png
                    0_1538476458867_56c78a7d-687e-4960-9dd3-e63237487074-image.png

                    0_1538476502705_156732dc-1477-4eb0-af2f-453173d4e892-image.png 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
                    0_1538476593015_878a794f-1605-47cd-ab3c-4c1d33e8f002-image.png

                    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.

                    1 Reply Last reply
                    0
                    • jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #48

                      @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?

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      J 1 Reply Last reply
                      2
                      • jsulmJ jsulm

                        @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?

                        J Offline
                        J Offline
                        jrod2much
                        wrote on last edited by
                        #49

                        @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.

                        jsulmJ 1 Reply Last reply
                        0
                        • J jrod2much

                          @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.

                          jsulmJ Offline
                          jsulmJ Offline
                          jsulm
                          Lifetime Qt Champion
                          wrote on last edited by jsulm
                          #50

                          @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?

                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply
                          1
                          • VRoninV Offline
                            VRoninV Offline
                            VRonin
                            wrote on last edited by
                            #51

                            in the connect(m_renderer etc, the third argument (this) is of type MainWindow, not QTextBrowser so it can't work, you need to pass m_ui->textBrowser there.

                            What's the full error the connect reports?

                            "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                            ~Napoleon Bonaparte

                            On a crusade to banish setIndexWidget() from the holy land of Qt

                            1 Reply Last reply
                            3
                            • J Offline
                              J Offline
                              jrod2much
                              wrote on last edited by jrod2much
                              #52

                              @VRonin @jsulm
                              0_1538483559136_2853b0c3-e6d0-4996-9bee-96992f6397df-image.png

                              jsulmJ 1 Reply Last reply
                              0
                              • J jrod2much

                                @VRonin @jsulm
                                0_1538483559136_2853b0c3-e6d0-4996-9bee-96992f6397df-image.png

                                jsulmJ Offline
                                jsulmJ Offline
                                jsulm
                                Lifetime Qt Champion
                                wrote on last edited by
                                #53

                                @jrod2much You still did not answer my question: is Renderer derived from QObject? Did you include the header file containing Renderer class definition?

                                https://forum.qt.io/topic/113070/qt-code-of-conduct

                                J.HilkJ 1 Reply Last reply
                                2
                                • jsulmJ jsulm

                                  @jrod2much You still did not answer my question: is Renderer derived from QObject? Did you include the header file containing Renderer class definition?

                                  J.HilkJ Offline
                                  J.HilkJ Offline
                                  J.Hilk
                                  Moderators
                                  wrote on last edited by
                                  #54

                                  @jsulm according to the error message, I would say m_renderer is not a QObject
                                  incomplete type 'Renderer *' to const QObject ....


                                  Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                                  Q: What's that?
                                  A: It's blue light.
                                  Q: What does it do?
                                  A: It turns blue.

                                  1 Reply Last reply
                                  2
                                  • J Offline
                                    J Offline
                                    jrod2much
                                    wrote on last edited by jrod2much
                                    #55

                                    @jsulm said in Signals and slots or whatever:

                                    @jrod2much You still did not answer my question: is Renderer derived from QObject? Did you include the header file containing Renderer class definition?

                                    Should I do that?

                                    Update: I included it, now the program runs. However, It is not printing any text on the textBrowser, but atleast I am getting somewhere

                                    1 Reply Last reply
                                    0
                                    • VRoninV VRonin

                                      @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 CccModule connect() the 2 signals together

                                      The 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

                                      VRoninV Offline
                                      VRoninV Offline
                                      VRonin
                                      wrote on last edited by
                                      #56

                                      I think you skipped this part:

                                      @VRonin said in Signals and slots or whatever:

                                      Now wherever the interpreter creates the CccModule connect() the 2 signals together

                                      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                                      ~Napoleon Bonaparte

                                      On a crusade to banish setIndexWidget() from the holy land of Qt

                                      J 1 Reply Last reply
                                      1
                                      • VRoninV VRonin

                                        I think you skipped this part:

                                        @VRonin said in Signals and slots or whatever:

                                        Now wherever the interpreter creates the CccModule connect() the 2 signals together

                                        J Offline
                                        J Offline
                                        jrod2much
                                        wrote on last edited by jrod2much
                                        #57

                                        @VRonin So I have changed where I am trying to get the value from, it is actually from the Renderer class, not the CccModule class anymore.

                                        New error

                                        QObject::connect: Cannot connect (null)::Rvalues(QString) to QTextBrowser::setText(QString)

                                        VRoninV jsulmJ 2 Replies Last reply
                                        0
                                        • J jrod2much

                                          @VRonin So I have changed where I am trying to get the value from, it is actually from the Renderer class, not the CccModule class anymore.

                                          New error

                                          QObject::connect: Cannot connect (null)::Rvalues(QString) to QTextBrowser::setText(QString)

                                          VRoninV Offline
                                          VRoninV Offline
                                          VRonin
                                          wrote on last edited by
                                          #58

                                          @jrod2much said in Signals and slots or whatever:

                                          So I have changed where I am trying to get the value from

                                          I see, cool

                                          New error

                                          Could you use Qt5 connection instead? errors usually are a lot more helpful:
                                          connect(m_interpreter->m_renderer,&Renderer::Rvalues,m_ui->textBrowser,&QTextBrowser::setText);

                                          "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                                          ~Napoleon Bonaparte

                                          On a crusade to banish setIndexWidget() from the holy land of Qt

                                          1 Reply Last reply
                                          2

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt
                                          • Unsolved