[mythtv] MythPopupBox losing focus

Philippe C.Cattin cattin at vision.ee.ethz.ch
Tue Oct 7 16:31:01 EDT 2003


Hi,

I'm planing to use MythPopupBox for a popupmenu in mythbrowser to add 
functionality (Back, NextTab, Mouse Emulation Mode, Save Link in 
Bookmarks...) to the browser without wasting additional keys. However, I 
noticed that the popupbox sometimes loses focus and returns it to its 
parent! Below you find a short example to explain the problem in more 
detail:

       menu = new MythPopupBox(this,"Menu");
       menu->addLabel("MythBrowser Menu");

       QButton *temp =
  	menu->addButton(tr(" Next Tab "), this, SLOT(actionNextTab()));
       menu->addButton(tr("   Back   "), this, SLOT(actionBack()));
       temp->setFocus();
       menu->ShowPopup(this,SLOT(cancelMenu()));

this code shows a popupbox with two buttons whereas the first one (Next 
Tab) is already highlighted. however, if I press 'cursor up' while
on 'NextTab' and 'cursor down' while on 'Back' respectively the
selection bar vanishes from the popupmenu (and focus goes back to the
browser behind the menu).

I checked-out MythPopupBox source code but couldn't find the problem. 
any hints?

regards, Philippe

-- 
Philippe C. Cattin                              cattin at vision.ee.ethz.ch
Swiss Federal Institute of Technology, ETHZ         Tel: +41-1-632 25 29
Computer Vision Laboratory, CH-8092 Zuerich         Fax: +41-1-632 11 99




More information about the mythtv-dev mailing list