[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Function to open window and return user input
From:       "Hans-Peter Jansen" <hpj () urpla ! net>
Date:       2012-01-23 22:43:59
Message-ID: 201201232343.59688.hpj () urpla ! net
[Download RAW message or body]

On Monday 23 January 2012, 18:53:46 Christopher Evans wrote:
> Is there a way to make this non modal? I am using Maya and we did not
> use exec because it always made the dialog application modal, as in
> it halts the main thread and doesn't allow users to interface with
> the parent app while the window is open.

Well, I don't have any experience with Maya at all, but what you need 
seems pretty straight forward. I would subclass QDialog, show (or 
exec_) the non modal dialog, and collect the data when closed.

The gory details depend on how Maya runs such extension code (eg. how 
QApplication and the event loop is handled). 

Pete

> CE
>
> On Sun, Jan 22, 2012 at 4:27 PM, Hans-Peter Jansen <hpj@urpla.net> 
wrote:
> > On Friday 20 January 2012, 20:38:33 Christopher Evans wrote:
> > > QInput is designed to get a single input from a user.
> > >
> > > In my case, we are making a complex remapping dialog that takes
> > > two ordered lists as input, allows the users to change the order,
> > > then on dialog close, it should return the two re-ordered lists.
> >
> > That's called a modal dialog. Create it, exec_ it (look up
> > QDialog::exec()), process data after close, and be done.
> >
> > Pete
> > _______________________________________________
> > PyQt mailing list    PyQt@riverbankcomputing.com
> > http://www.riverbankcomputing.com/mailman/listinfo/pyqt


_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic