Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. call a function with a signal
Forum Updated to NodeBB v4.3 + New Features

call a function with a signal

Scheduled Pinned Locked Moved Solved General and Desktop
14 Posts 5 Posters 1.5k Views 1 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.
  • B Offline
    B Offline
    BKBK
    wrote on last edited by
    #1

    QT Novice
    I am following the official tutorials and making a few mods just for fun. Chapter Five creates a slider and LDC named lcd. It suggests that I set the mode to hex and binary with buttons. Did that. But when setting to binary, the number of digits should be increased. In the LCD that is the function call setNumDigits(), but it is not a slot. When the pushbutton named “set_binary” outputs SIGNAL( clicked() ), what might be done to manufacture the function call lcd->setNumDigits(8);

    1 Reply Last reply
    0
    • Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Connect the signal with a custom slot written by you and call lcd->setNumDigits() in there.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      2
      • B Offline
        B Offline
        BKBK
        wrote on last edited by
        #3

        I was thinking something along those lines. We are running QT 3 and everything about custom slots that I found is for QT 4 and later and says things have changed. I will be looking for this later in the QT3 Assistant that I am working now.
        Thanks for the reply.

        VRoninV 1 Reply Last reply
        0
        • B BKBK

          I was thinking something along those lines. We are running QT 3 and everything about custom slots that I found is for QT 4 and later and says things have changed. I will be looking for this later in the QT3 Assistant that I am working now.
          Thanks for the reply.

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

          @BKBK said in call a function with a signal:

          We are running QT 3

          😱

          Any particular reason? There has been a massive architecture change between 3 and 4, I doubt you'll find much support for a 17 years old version

          "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

          B 1 Reply Last reply
          1
          • B Offline
            B Offline
            BKBK
            wrote on last edited by
            #5

            I just looked and found 112 dot cpp files with the text QApplication. I presume the upgrade is significant to the point that writing a script to make the changes would be difficult.

            aha_1980A 1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Hi,

              You should check:

              • http://doc.qt.io/archives/qt-4.8/porting4-overview.html
              • http://doc.qt.io/archives/qt-4.8/porting4.html
              • http://doc.qt.io/archives/qt-4.8/qt3to4.html

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              3
              • B BKBK

                I just looked and found 112 dot cpp files with the text QApplication. I presume the upgrade is significant to the point that writing a script to make the changes would be difficult.

                aha_1980A Offline
                aha_1980A Offline
                aha_1980
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Hi @BKBK,

                just to add to @SGaist, here is a porting guide from Qt 1.0 to 5.11 ;)

                Regards

                Qt has to stay free or it will die.

                1 Reply Last reply
                4
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Very good article ! Thanks !

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  2
                  • VRoninV VRonin

                    @BKBK said in call a function with a signal:

                    We are running QT 3

                    😱

                    Any particular reason? There has been a massive architecture change between 3 and 4, I doubt you'll find much support for a 17 years old version

                    B Offline
                    B Offline
                    BKBK
                    wrote on last edited by
                    #9

                    @VRonin said in call a function with a signal:

                    @BKBK said in call a function with a signal:

                    We are running QT 3

                    😱

                    Any particular reason? There has been a massive architecture change between 3 and 4, I doubt you'll find much support for a 17 years old version

                    Yes, just looked into that. I work for the Air Force and have been told that the security team has found vulnerabilities in QT5 and 6 and will not allow its use. We are looking at QT4 but we have some 1600 source code files that use QT and that will take significant effort.
                    I do not know if anyone from that security team has been in touch with the QT people.

                    VRoninV 1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      @BKBK said in call a function with a signal:

                      Yes, just looked into that. I work for the Air Force and have been told that the security team has found vulnerabilities in QT5 and 6 and will not allow its use

                      They are pretty good ! They found vulnerabilities in a not yet started version of Qt ;-)

                      Jokes aside, do you know what version they analysed ? And did they contact the Qt Company so these can be fixed and would thus allow you to use a supported version ?

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      B 1 Reply Last reply
                      1
                      • SGaistS SGaist

                        @BKBK said in call a function with a signal:

                        Yes, just looked into that. I work for the Air Force and have been told that the security team has found vulnerabilities in QT5 and 6 and will not allow its use

                        They are pretty good ! They found vulnerabilities in a not yet started version of Qt ;-)

                        Jokes aside, do you know what version they analysed ? And did they contact the Qt Company so these can be fixed and would thus allow you to use a supported version ?

                        B Offline
                        B Offline
                        BKBK
                        wrote on last edited by
                        #11

                        @SGaist
                        sorry about that error. No, I do not know if any contact has been made. I am down at the bottom of that totem pole. From my perspective, the decisions made by those that do that security/vulnerability checking affect all the Air Force developers (and many contractors), a large number of developers. They really don't care to hear from all those thousands of developers, each of whom has their own favorite tools.
                        They probably don't even want us to ask if that contact has been made, but I will query around here and see if anyone knows anything.

                        1 Reply Last reply
                        0
                        • B Offline
                          B Offline
                          BKBK
                          wrote on last edited by
                          #12

                          I found a QT site that looks like the developer site and posted an email via the "contact us" link asking if they are aware of this testing that I have heard of. I will try to follow up on that.

                          1 Reply Last reply
                          0
                          • B BKBK

                            @VRonin said in call a function with a signal:

                            @BKBK said in call a function with a signal:

                            We are running QT 3

                            😱

                            Any particular reason? There has been a massive architecture change between 3 and 4, I doubt you'll find much support for a 17 years old version

                            Yes, just looked into that. I work for the Air Force and have been told that the security team has found vulnerabilities in QT5 and 6 and will not allow its use. We are looking at QT4 but we have some 1600 source code files that use QT and that will take significant effort.
                            I do not know if anyone from that security team has been in touch with the QT people.

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

                            @BKBK said in call a function with a signal:

                            the security team has found vulnerabilities

                            While I don't doubt they did, Qt is safe enough to get certified for use in many critical applications including medical: https://www.qt.io/functional-safety-and-qt

                            "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
                            1
                            • B Offline
                              B Offline
                              BKBK
                              wrote on last edited by
                              #14

                              And at the end, since my system does not display the tools needed to edit my replies,
                              the resolution is:
                              Write a custom slot than then creates two or more signals to get things done.

                              1 Reply Last reply
                              0

                              • Login

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