Results 1 to 3 of 3

Thread: dockable widgets (in mainwindow) with common shortcut not working

  1. #1
    Join Date
    Aug 2008
    Posts
    60
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default dockable widgets (in mainwindow) with common shortcut not working

    Hi,
    It seems that if more than one dockwidgets are shown in main window then the shortcut set for the dockwidget's pushbutton is not working.
    Pl. find the attached dockwidgets.tar.gz qt-example program, here I have attached "Esc" key to close button of both 'Customers' and 'Paragraphs' dockwidgets.
    Here I want to dismiss the docked widget when I press the "Esc" key. This is working fine if one dock widget is shown (and also when dock widgets are undocked from the mainwindow) but fails if two dockwidgets are shown in mainwindow.
    Thank you.
    Attached Files Attached Files

  2. #2
    Join Date
    Aug 2008
    Posts
    60
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: dockable widgets (in mainwindow) with common shortcut not working

    Any suggestion please.
    Thank you.

  3. #3
    Join Date
    Sep 2007
    Location
    Szczecin, Poland
    Posts
    153
    Thanks
    7
    Thanked 11 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: dockable widgets (in mainwindow) with common shortcut not working

    It's because qt doesn't know which dock widget it should close(if dockwidgets are undocked shortcut for dockwidget with focus is activated and if you have only one widget visible there's also no shortcuts conflict).
    You should set some global 'esc' shortcut (see QShortcut) and close dockwidgets with some priority there(if more that one are visible and docked to same main window), or see QShortcut::activatedAmbiguously () signal or QShortcutEvent.
    See GrEEn (Graphics Effects Environment)
    http://sourceforge.net/project/platf...roup_id=232746
    a qt-based plugins oriented MDI image processing application(contains also qt plugins like styles & imageformats).

Similar Threads

  1. widgets behind hidden widgets not working
    By bpetty in forum Newbie
    Replies: 13
    Last Post: 7th September 2007, 20:23

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.