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/Mac bugs
Forum Update on Monday, May 27th 2025

Qt/Mac bugs

Scheduled Pinned Locked Moved General and Desktop
16 Posts 5 Posters 9.2k Views
  • 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.
  • S Offline
    S Offline
    serkol
    wrote on last edited by
    #1

    I keep programming my first Qt app (Mac/Win). I try to make the Mac version look as much “native” as possible.
    I’ve came across 2 Qt/Mac bugs that bother me. If they bother you too, could you possible vote for my bug reports, so that they are fixed sooner?

    http://bugreports.qt.nokia.com/browse/QTBUG-15474
    http://bugreports.qt.nokia.com/browse/QTBUG-15475

    1 Reply Last reply
    0
    • H Offline
      H Offline
      hhartz
      wrote on last edited by
      #2

      Or even better, try to fix it and submit a Merge Request ;-)

      --

      1 Reply Last reply
      0
      • S Offline
        S Offline
        serkol
        wrote on last edited by
        #3

        This is my first ever Qt app. I'll tell you more - this is my first ever C++ effort. If I try to fix this, I will only create much more bugs :-)

        Actually I wonder if Qt community is interested in Mac platform at all.

        1 Reply Last reply
        0
        • G Offline
          G Offline
          goetz
          wrote on last edited by
          #4

          Yes we definitely are :-)

          http://www.catb.org/~esr/faqs/smart-questions.html

          1 Reply Last reply
          0
          • S Offline
            S Offline
            serkol
            wrote on last edited by
            #5

            Good to know. So there is a hope that the bugs will be fixed :-)

            I have an app in the iOS App Store. Many my users want to have a companion desktop app. Most of them have Windows on their desktop, so my app needs to be at least Win/Mac. I have chosen Qt and spent the last 6 months programming this app. I hope that I made the right choice.

            As a bonus my app will run on MeeGo, and it may be easier to port it to Nokia smartphones in the future. But let's be realistic, if I want to be paid for programming this desktop app now, it needs to run on Win and Mac.

            If you keep improving Qt for Win and Mac, you may interest thousands of iOS developers like myself. And later we will contribute to MeeGo and Nokia smartphones.

            1 Reply Last reply
            0
            • G Offline
              G Offline
              goetz
              wrote on last edited by
              #6

              That's the point. We once used Delphi for (commercial) application and had no chance for a Mac version. So we eventually switched to Qt and got the Mac version for free. And if someone ever asks for a Linux version... :-)

              It will be interesting if Apple accepts Qt based apps for the Mac app store. That would be a great opportunity.

              http://www.catb.org/~esr/faqs/smart-questions.html

              1 Reply Last reply
              0
              • S Offline
                S Offline
                serkol
                wrote on last edited by
                #7

                I also used Delphi since the 1st version until 2 years ago... well, farewell to Delphi...

                I use Java on the server side, but I don't like it on the desktop, and it looks like Apple doesn't like it neither.

                I also hope that Apple accepts Qt based apps. I don't see anything in their requirements to prevent this, if the app includes Qt as a private framework, and look and behave like native Mac apps. There are things that make Qt apps look strange on Mac - I hope that they will be fixed...

                Even if Apple rejects Qt apps, I still can advertise my desktop app in my iOS apps, so it will not the end of the world for me (my iOS apps are relatively successful, and many my current users will buy the desktop app). But this will definitely be a big minus for many other developers.

                1 Reply Last reply
                0
                • X Offline
                  X Offline
                  xsacha
                  wrote on last edited by
                  #8

                  What would be the solution for 15475?
                  Scrollwheel works while date/time is in focus (it's in focus right?).
                  Should it only accept scrollwheel when mouse is hovering over the element on Mac?

                  It doesn't sound that difficult if you want to delve in to Qt code ;) I don't have a Mac to test this on.

                  • Sacha
                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    serkol
                    wrote on last edited by
                    #9

                    15475: when a QDateEdit or a QComboBox is in focus, but the mouse pointer is not above the widget, the widget reacts to the scrollwheel. A widget should not react to the scrollwheel when the mouse pointer is outside it (any widget).

                    A real life scenario:

                    • I open a dialog and change the value in a combobox.
                    • I move the mouse to the OK button and click it.
                    • I am using a MagicMouse. It generates scrollwheel signals every time when my finger slightly moves anywhere on the mouse. When I click the OK button, a split-second before clicking my finger slides a little, and the combobox changes its value. A split-second later the dialog is closed - I just entered a wrong value without even noticing this.

                    Every new Mac desktop comes with MagicMouse. This bug will happen quite often.

                    Microsoft makes a similar mouse for Windows. It's not that widespread as MagicMouse, but we will have the same problem on Windows if this kind of mice becomes popular on Windows.

                    Native Mac OS widgets do not react to scrollwheel when the mouse pointer is outside. In general they mostly ignore the scrollwheel. For example, a native tab widget ignores the scrollwheel altogether, but a Qt widget reacts to it. When I tested my app on Mac, I've noticed that I often selected a wrong tab. I select a tab, but when I move the mouse away, my finger slides a little horizontally, and the widget selects another tab. I ended up inheriting from QTabBar and cancelling scrollwheel events. If the bug with QDateEdit and QComboBox is not fixed, I will have to replace them too everywhere in my app...

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      serkol
                      wrote on last edited by
                      #10

                      So, I have a workaround for 15475, but no workaround for 15474...

                      Can anyone suggest a workaround for 15474? Can I fix this if I inherit from QDialog? What should I change?

                      1 Reply Last reply
                      0
                      • X Offline
                        X Offline
                        xsacha
                        wrote on last edited by
                        #11

                        Well it seems there is no doubt about it being the wrong functionality on Mac. I believe Windows works like this natively though.

                        It really wouldn't be too hard to change, I think. Have you looked at the Qt source responsible?
                        I don't have a Mac available. If you aren't good enough in C++, I can make a patch and have you try it if you want. But you'd still need to have the source and compile it anyway.

                        Edit: If you have a workaround I guess it can wait.

                        • Sacha
                        1 Reply Last reply
                        0
                        • H Offline
                          H Offline
                          hhartz
                          wrote on last edited by
                          #12

                          I guess it could be worked around by using a mouse filter to discard scroll events if the mouse isn't hovering over the datetime edit?

                          http://bugreports.qt.nokia.com/browse/QTBUG-15475?focusedCommentId=134729&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-134729

                          --

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            serkol
                            wrote on last edited by
                            #13

                            Sure the scrollwheel bug can be worked around. If this bug is not fixed within the next 2 weeks, I'll have to work around it for all 100 or so comboboxes, dateedits and spinboxes in my app.

                            1 Reply Last reply
                            0
                            • I Offline
                              I Offline
                              infoctopus
                              wrote on last edited by
                              #14

                              Generally, Qt is Salvation for a Delphi developer, excellent alternative for good VCL, cross-platform as a bonus :)

                              Qt rulez

                              1 Reply Last reply
                              0
                              • H Offline
                                H Offline
                                hhartz
                                wrote on last edited by
                                #15

                                serkol; but shouldn't you be able to work around it only one place? E.g. QApplication::notify, and discard the event if the widget doesn't contain the mouse? Requires mouse tracking however, which might slow you down. Alternatively, you unfocus them when the mouse leaves..

                                --

                                1 Reply Last reply
                                0
                                • S Offline
                                  S Offline
                                  serkol
                                  wrote on last edited by
                                  #16

                                  QApplication::notify - I may try this.

                                  unfocus them when the mouse leaves - that would be a mistake. Keyboard. A user may move the mouse out, but use the keyboard to change the value in the widget.

                                  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