[Qt-interest] Launching Inputpanel on top of Qt::ApplicationModal dialog

Bradley T. Hughes bradley.hughes at nokia.com
Fri Jan 8 10:14:29 CET 2010


On 01/08/2010 02:38 AM, manish.s.sharma at nokia.com wrote:
> Hi All,
>
> I am trying to develop an input panel for Qt applications, mostly I will extend Qt's example\tools\inputpanel example. Now there is a problem if editor is inside a QDialog having Qt::ApplicationModal set.  Since a dialog is a application modal dialog it blocks all the user input events from the application and hence we will not be able to click on the panel buttons to enter some text.
>
> What I want is irrespective of the editor's window modality, if the
> panel  is launched on top of the editor's window panel should get the event. Is
> there any way to solve this problem? What I feel that we should have some
> API's in QWidget level something like QWIdget::setAsInputPanel() and in
> QApplication we can check for this property and pass the event to the panel.

There is a very simple way to do this: make your input panel a child of the 
modal dialog. Modality only blocks events to siblings and ancestors, but 
allows events to descendents.

-- 
Bradley T. Hughes (Nokia-D-Qt/Oslo), bradley.hughes at nokia.com
Sandakervn. 116, P.O. Box 4332 Nydalen, 0402 Oslo, Norway



More information about the Qt-interest-old mailing list