Solved QT Built-in Calculator example Button Click does not work
-
Hello,
I downloaded the calculator example from Qt: https://doc.qt.io/qt-5/qtwidgets-widgets-calculator-example.htmlAnd 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 CatalinaHere you can see how it behaves:
https://www.dropbox.com/s/ctr1w2b36mfon3a/WhatsApp Video 2020-05-15 at 20.51.06.mp4?dl=0Thank you for your help
-
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
-
Hi @fatih1,
all examples are available in QtCreator in the welcome page, section examples.
What happens if you run it from there?
Regards
-
@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. -
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
-
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. -
Hi,
I can't reproduce your issue on macOS 10.13.
Did you clone the code ?
-
Hello @SGaist
Yes i did clone it -
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
-
It's likely something Catalina specific