Results 1 to 8 of 8

Thread: Cannot override copy shortcut

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2008
    Posts
    31
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    1
    Thanked 5 Times in 3 Posts

    Default Re: Cannot override copy shortcut

    That's very disappointing. So if I had a custom spreadsheet application I can only copy a range with Ctrl+C when the action is visible?

    I wonder how the default copy shortcut works...

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Cannot override copy shortcut

    Quote Originally Posted by Paladin12 View Post
    That's very disappointing. So if I had a custom spreadsheet application I can only copy a range with Ctrl+C when the action is visible?
    How else would a user know there is an action with a Ctrl+C shortcut?

    I wonder how the default copy shortcut works...
    I don't know what you mean by "default copy shortcut" but you can install an application wide shortcut if you want. Not directly through QAction though.

  3. #3
    Join Date
    Jul 2008
    Posts
    31
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    1
    Thanked 5 Times in 3 Posts

    Default Re: Cannot override copy shortcut

    I see now. I'm trying to implement many Ctrl+C's that behave differently depending upon the widget they are acting upon, and Qt does not support this.

    I need something like a contextual shortcut, but they don't exist.

    Thanks for your help anyway!

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Cannot override copy shortcut

    Quote Originally Posted by Paladin12 View Post
    I see now. I'm trying to implement many Ctrl+C's that behave differently depending upon the widget they are acting upon, and Qt does not support this.
    Why not?

    I need something like a contextual shortcut, but they don't exist.
    Every shortcut in Qt has a context. See the docs for QShortcut.

Similar Threads

  1. How to override system shortcut left Alt+Space
    By MasterBLB in forum Qt Programming
    Replies: 2
    Last Post: 28th March 2010, 11:28
  2. override shortcut icon in QToolBar
    By sudhansu in forum Qt Programming
    Replies: 1
    Last Post: 18th February 2010, 08:20
  3. Override a signal
    By daviddoria in forum Newbie
    Replies: 4
    Last Post: 9th February 2010, 18:18
  4. override wheelEvent for QScrollBar
    By ChasW in forum Qt Programming
    Replies: 6
    Last Post: 25th January 2007, 09:50
  5. override minimumSize function
    By niko in forum Qt Programming
    Replies: 4
    Last Post: 30th October 2006, 05:28

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.