Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-30399

Stack Overflow connecting a shortcut with a QToolButton

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.8.5, 5.1.0 Beta 1
    • 4.8.4, 5.0.1
    • None
    • Windows 8 + Vs2010, Windows 8 + mingw 4.6 + qtcreator. MacOsx + qtcreator
    • f5ea183cc6a6cd66fb3f804041fc112687e0a060

    Description

      Connecting a shortcut to the showMenu slot of a QToolBox cause a stack overflow in the application if you invoke the shortcut for a variable number of times. The number of shortcut click in order to get the crash depends on the OS, on the IDE you are using and on the qt version.
      For instance in windows 8/visual studio 2010 with qt 5.0.1 I get it after 41 shortcut invokations instead with windows 8/qt creator qt 4.8.4 i need to press on the shortcut for 155 times. I tested it also in macosx and I had the same problem even if you need to press the shortcut a lot more.
      In the example I send you in attachment the shortcut is ctrl+f. I tryied both with QShortcut::autoRepeat turned on and off and I get the same crash with the same number of shortcut invokation. In the example I connected the shortcut to a user defined slot but I get the same results if I directly connect it to the QToolBox::showMenu slot.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            frederik Frederik Gladhorn
            inopportuno Guido Ranzuglia
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes