Re: [PyQt] Function to open window and return user input
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 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 listPyQt@riverbankcomputing.com > > http://www.riverbankcomputing.com/mailman/listinfo/pyqt ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Function to open window and return user input
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. CE On Sun, Jan 22, 2012 at 4:27 PM, Hans-Peter Jansen 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 listPyQt@riverbankcomputing.com > http://www.riverbankcomputing.com/mailman/listinfo/pyqt > -- CE ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Function to open window and return user input
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 listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Function to open window and return user input
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. Thanks CE On Fri, Jan 20, 2012 at 10:10 AM, Phil Thompson wrote: > On Fri, 20 Jan 2012 01:52:26 +0100, Christopher Evans > wrote: > > What's the best way to open a pyqt win and return user input? > > > > Kind of like with pyqt's built in simple windows (save, load, ok/cancel, > > etc). > > > > I would like to make a function that when run, pops a window open, then > > when closed, the fn resumes and returns some info based on user input. > > QInputDialog > > Phil > -- CE ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Function to open window and return user input
On Fri, 20 Jan 2012 01:52:26 +0100, Christopher Evans wrote: > What's the best way to open a pyqt win and return user input? > > Kind of like with pyqt's built in simple windows (save, load, ok/cancel, > etc). > > I would like to make a function that when run, pops a window open, then > when closed, the fn resumes and returns some info based on user input. QInputDialog Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Function to open window and return user input
What's the best way to open a pyqt win and return user input? Kind of like with pyqt's built in simple windows (save, load, ok/cancel, etc). I would like to make a function that when run, pops a window open, then when closed, the fn resumes and returns some info based on user input. Thanks, -- CE ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt