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. QT Built-in Calculator example Button Click does not work
Forum Updated to NodeBB v4.3 + New Features

QT Built-in Calculator example Button Click does not work

Scheduled Pinned Locked Moved Solved General and Desktop
9 Posts 3 Posters 649 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.
  • F Offline
    F Offline
    fatih1
    wrote on last edited by fatih1
    #1

    Hello,
    I downloaded the calculator example from Qt: https://doc.qt.io/qt-5/qtwidgets-widgets-calculator-example.html

    And I tried to compile the program. I could see a calculator but somehow nothing happened when I clicked at the buttons.

    I have changed nothing in the code
    and I am using a Macbook Pro with MacOS 10.15.4 Catalina

    Here you can see how it behaves:
    https://www.dropbox.com/s/ctr1w2b36mfon3a/WhatsApp Video 2020-05-15 at 20.51.06.mp4?dl=0

    Thank you for your help

    aha_1980A 1 Reply Last reply
    0
    • F Offline
      F Offline
      fatih1
      wrote on last edited by
      #8

      I finally solved it. Apparently it really is a problem just for Mac user
      I need to use display->repaint() after the display->setText() functions.

      Thank you for your help

      1 Reply Last reply
      0
      • F fatih1

        Hello,
        I downloaded the calculator example from Qt: https://doc.qt.io/qt-5/qtwidgets-widgets-calculator-example.html

        And I tried to compile the program. I could see a calculator but somehow nothing happened when I clicked at the buttons.

        I have changed nothing in the code
        and I am using a Macbook Pro with MacOS 10.15.4 Catalina

        Here you can see how it behaves:
        https://www.dropbox.com/s/ctr1w2b36mfon3a/WhatsApp Video 2020-05-15 at 20.51.06.mp4?dl=0

        Thank you for your help

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

        Hi @fatih1,

        all examples are available in QtCreator in the welcome page, section examples.

        What happens if you run it from there?

        Regards

        Qt has to stay free or it will die.

        1 Reply Last reply
        1
        • F Offline
          F Offline
          fatih1
          wrote on last edited by
          #3

          @aha_1980 said in QT Built-in Calculator example Button Click does not work:

          all examples are available in QtCreator in the welcome page, section examples.

          Hello aha_1980,
          I ran the exact same code from the examples section in the welcome page. It somehow does not work with the buttons.

          aha_1980A 1 Reply Last reply
          0
          • F fatih1

            @aha_1980 said in QT Built-in Calculator example Button Click does not work:

            all examples are available in QtCreator in the welcome page, section examples.

            Hello aha_1980,
            I ran the exact same code from the examples section in the welcome page. It somehow does not work with the buttons.

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

            Hi @fatih1,

            I don't have a Mac, but that example is running perfectly fine on my Ubuntu Linux when I compile it against Qt 5.14.1.

            Which Qt version are you using?

            Regards

            Qt has to stay free or it will die.

            1 Reply Last reply
            0
            • F Offline
              F Offline
              fatih1
              wrote on last edited by
              #5

              Hello @aha_1980 , thanks for your reply.

              yes, it works fine other systems (on windows and ubuntu atleast)
              I don't know why it does not work on my macos . Rest everything works fine. I could compile other programs.

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

                Hi,

                I can't reproduce your issue on macOS 10.13.

                Did you clone the code ?

                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
                0
                • F Offline
                  F Offline
                  fatih1
                  wrote on last edited by
                  #7

                  Hello @SGaist
                  Yes i did clone it

                  1 Reply Last reply
                  0
                  • F Offline
                    F Offline
                    fatih1
                    wrote on last edited by
                    #8

                    I finally solved it. Apparently it really is a problem just for Mac user
                    I need to use display->repaint() after the display->setText() functions.

                    Thank you for your help

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

                      It's likely something Catalina specific

                      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
                      1

                      • Login

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