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. Action shortcut missing in context menu
Forum Updated to NodeBB v4.3 + New Features

Action shortcut missing in context menu

Scheduled Pinned Locked Moved Solved General and Desktop
16 Posts 4 Posters 4.6k Views 2 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.
  • JonBJ JonB

    @Rory_1 said in Action shortcut missing in context menu:

    This question shows it is possible: https://forum.qt.io/topic/82367/adding-more-actions-to-the-context-menu-of-a-spreadsheet-app

    Why don't you download its source and have a look at how it achieves it, then?

    R Offline
    R Offline
    Rory_1
    wrote on last edited by
    #5

    @JonB said in Action shortcut missing in context menu:

    @Rory_1 said in Action shortcut missing in context menu:

    This question shows it is possible: https://forum.qt.io/topic/82367/adding-more-actions-to-the-context-menu-of-a-spreadsheet-app

    Why don't you download its source and have a look at how it achieves it, then?

    I did, but I don't see why it is working in that example based on looking at the code. I haven't been able to get the project to run yet to confirm it actually does what the image suggests though.

    JonBJ 1 Reply Last reply
    0
    • R Rory_1

      @JonB said in Action shortcut missing in context menu:

      @Rory_1 said in Action shortcut missing in context menu:

      This question shows it is possible: https://forum.qt.io/topic/82367/adding-more-actions-to-the-context-menu-of-a-spreadsheet-app

      Why don't you download its source and have a look at how it achieves it, then?

      I did, but I don't see why it is working in that example based on looking at the code. I haven't been able to get the project to run yet to confirm it actually does what the image suggests though.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #6

      @Rory_1
      I don't know, but your screenshot looks different from that example. Is it possible that this uses a native OS/UI/desktop functionality to display the context menu, and that works for the icon on some other OS but not yours?

      R 2 Replies Last reply
      0
      • JonBJ JonB

        @Rory_1
        I don't know, but your screenshot looks different from that example. Is it possible that this uses a native OS/UI/desktop functionality to display the context menu, and that works for the icon on some other OS but not yours?

        R Offline
        R Offline
        Rory_1
        wrote on last edited by
        #7

        @JonB

        That's a good point. I'll fiddle around with my style sheet to see if it is the culprit.

        1 Reply Last reply
        0
        • JonBJ JonB

          @Rory_1
          I don't know, but your screenshot looks different from that example. Is it possible that this uses a native OS/UI/desktop functionality to display the context menu, and that works for the icon on some other OS but not yours?

          R Offline
          R Offline
          Rory_1
          wrote on last edited by
          #8

          @JonB
          I tried without my style sheet and I still get the same thing so that does not appear to be the issue.

          JonBJ 1 Reply Last reply
          0
          • R Rory_1

            @JonB
            I tried without my style sheet and I still get the same thing so that does not appear to be the issue.

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by
            #9

            @Rory_1
            Are you Qt 5.10? Are you https://github.com/lxde/lxqt/issues/1426 ??

            R 1 Reply Last reply
            0
            • JonBJ JonB

              @Rory_1
              Are you Qt 5.10? Are you https://github.com/lxde/lxqt/issues/1426 ??

              R Offline
              R Offline
              Rory_1
              wrote on last edited by
              #10

              @JonB said in Action shortcut missing in context menu:

              @Rory_1
              Are you Qt 5.10? Are you https://github.com/lxde/lxqt/issues/1426 ??

              Yes, I am on 5.10 and that appears to be the issue - thanks for finding it!! Seems like an odd "improvement". I really appreciate the help.

              BTW I did get the spreadsheet app to run and I did not see the shortcuts.

              JonBJ 1 Reply Last reply
              0
              • R Rory_1

                @JonB said in Action shortcut missing in context menu:

                @Rory_1
                Are you Qt 5.10? Are you https://github.com/lxde/lxqt/issues/1426 ??

                Yes, I am on 5.10 and that appears to be the issue - thanks for finding it!! Seems like an odd "improvement". I really appreciate the help.

                BTW I did get the spreadsheet app to run and I did not see the shortcuts.

                JonBJ Offline
                JonBJ Offline
                JonB
                wrote on last edited by
                #11

                @Rory_1
                :)

                BTW I did get the spreadsheet app to run and I did not see the shortcuts.

                Probably also requires the fix for your 5.10.

                R 1 Reply Last reply
                0
                • JonBJ JonB

                  @Rory_1
                  :)

                  BTW I did get the spreadsheet app to run and I did not see the shortcuts.

                  Probably also requires the fix for your 5.10.

                  R Offline
                  R Offline
                  Rory_1
                  wrote on last edited by
                  #12

                  @JonB

                  Right.

                  I hate to mark this issue as solved, but if that's the way Qt is going I guess I'll just have to live with it. I'll take a look at subclassing QStyleHints.

                  JonBJ 1 Reply Last reply
                  0
                  • R Rory_1

                    @JonB

                    Right.

                    I hate to mark this issue as solved, but if that's the way Qt is going I guess I'll just have to live with it. I'll take a look at subclassing QStyleHints.

                    JonBJ Offline
                    JonBJ Offline
                    JonB
                    wrote on last edited by
                    #13

                    @Rory_1
                    As per http://doc.qt.io/qt-5/qstylehints.html#showShortcutsInContextMenus-prop, this is a deliberately-introduced option now.

                    R 1 Reply Last reply
                    0
                    • JonBJ JonB

                      @Rory_1
                      As per http://doc.qt.io/qt-5/qstylehints.html#showShortcutsInContextMenus-prop, this is a deliberately-introduced option now.

                      R Offline
                      R Offline
                      Rory_1
                      wrote on last edited by
                      #14

                      @JonB

                      I understand - doesn't mean I have to agree with it. I've been thinking about how I would go about subclassing QStyleHints. I know how to subclass a widget that I can then use, but how do I subclass something I am not calling myself. Do I have to subclass QGuiApplication? Seems like that might be risky.

                      mrjjM 1 Reply Last reply
                      0
                      • R Rory_1

                        @JonB

                        I understand - doesn't mean I have to agree with it. I've been thinking about how I would go about subclassing QStyleHints. I know how to subclass a widget that I can then use, but how do I subclass something I am not calling myself. Do I have to subclass QGuiApplication? Seems like that might be risky.

                        mrjjM Offline
                        mrjjM Offline
                        mrjj
                        Lifetime Qt Champion
                        wrote on last edited by
                        #15

                        @Rory_1
                        Hi
                        Its being debated.
                        https://bugreports.qt.io/browse/QTBUG-61181?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel&showAll=true
                        So there might come a Set method. Currently its read only :(

                        R 1 Reply Last reply
                        1
                        • mrjjM mrjj

                          @Rory_1
                          Hi
                          Its being debated.
                          https://bugreports.qt.io/browse/QTBUG-61181?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel&showAll=true
                          So there might come a Set method. Currently its read only :(

                          R Offline
                          R Offline
                          Rory_1
                          wrote on last edited by
                          #16

                          @mrjj
                          Thanks for the info. Much appreciated.

                          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