Results 1 to 4 of 4

Thread: ShowMaximized() by a hot-key

  1. #1
    Join Date
    Dec 2008
    Posts
    32
    Thanks
    17
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default ShowMaximized() by a hot-key

    Hello!
    Please help!
    here is code, compiled ok but don't work...

    I insert it in constructor of mainWindow:
    Qt Code:
    1. QAction *a = new QAction(this);
    2. a->setShortcut(QKeySequence(Qt::Key_F11));
    3. a->setShortcutContext(Qt::ApplicationShortcut);
    4. connect(a, SIGNAL(triggered() ), this, SLOT(showMaximized() ) );
    To copy to clipboard, switch view to plain text mode 

    Thanks!

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: ShowMaximized() by a hot-key

    Did you add the action somewhere? If you're not going to add it to a menu for example, you might want to switch to QShortcut instead.
    J-P Nurmi

  3. The following user says thank you to jpn for this useful post:

    araglin (29th January 2009)

  4. #3
    Join Date
    Dec 2008
    Posts
    32
    Thanks
    17
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: ShowMaximized() by a hot-key

    No, I wanted to made hidden undocumented command. So, I'll try QShortcut, thanks!

  5. #4
    Join Date
    Dec 2008
    Posts
    32
    Thanks
    17
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: ShowMaximized() by a hot-key

    Wow, it works now )
    Thank you very much!

Similar Threads

  1. showMaximized in MDI
    By walito in forum Newbie
    Replies: 3
    Last Post: 14th September 2007, 00:48
  2. Problem with showMaximized()
    By Lykurg in forum Newbie
    Replies: 6
    Last Post: 11th July 2007, 09:06
  3. showMaximized doesnt show the canvas
    By Kapil in forum Qt Programming
    Replies: 5
    Last Post: 23rd May 2006, 12:22

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.