Re: [PyQt] Testing PyQt using code with unit-tests and Mock

2011-07-27 Thread Andreas Pakulat
On 27.07.11 22:19:43, Phil Thompson wrote: > On Wed, 27 Jul 2011 21:31:22 +0200, Andreas Pakulat wrote: > > Hi, > > > > I've got a bit of a problem to test my PyQt based code via unit-tests > > involving mock objects (specifically minimock). > > > > I'd like to find a way to emit a signal with a

[PyQt] reselecting last item in a qtreewidget after a clear

2011-07-27 Thread Jason Rahm
I have an item in the qtreewidget that when selected displays text in another widget. When I do a save on that text, it updates the file on the remote system and the local data file, but when the qtreeview is cleared and rebuilt, my selected item is obviously no longer selected. How do I ensur

[PyQt] combining python regex with QPlainTextEdit?

2011-07-27 Thread David Cortesi
This is a high-level design question. I'm looking at writing a PyQt-based replacement for an old app written in Perl/TCL. It is basically a specialized text editor and QPlainTextEdit would be a nifty basis with one exception: regex find/replace. The old app fully exposed Perl regex syntax in its F

Re: [PyQt] Testing PyQt using code with unit-tests and Mock

2011-07-27 Thread Phil Thompson
On Wed, 27 Jul 2011 21:31:22 +0200, Andreas Pakulat wrote: > Hi, > > I've got a bit of a problem to test my PyQt based code via unit-tests > involving mock objects (specifically minimock). > > I'd like to find a way to emit a signal with a mock-object instead of > the real, but I can't seem to f

[PyQt] Testing PyQt using code with unit-tests and Mock

2011-07-27 Thread Andreas Pakulat
Hi, I've got a bit of a problem to test my PyQt based code via unit-tests involving mock objects (specifically minimock). I'd like to find a way to emit a signal with a mock-object instead of the real, but I can't seem to find a way to do that. The attached example demonstrates the problem. Inste

Re: [PyQt] QHostAddress is missing a method

2011-07-27 Thread Phil Thompson
On Wed, 27 Jul 2011 18:57:53 +0200, Detlev Offenbach wrote: > On Dienstag, 26. Juli 2011, Phil Thompson wrote: >> On Sat, 16 Jul 2011 18:11:04 +0200, Detlev Offenbach >> >> wrote: >> > Hello, >> > >> > I think the QHostAddress mappings are missing the method >> >> "toIPv6Address". >> >> > If

Re: [PyQt] QHostAddress is missing a method

2011-07-27 Thread Detlev Offenbach
On Dienstag, 26. Juli 2011, Phil Thompson wrote: > On Sat, 16 Jul 2011 18:11:04 +0200, Detlev Offenbach > > wrote: > > Hello, > > > > I think the QHostAddress mappings are missing the method > > "toIPv6Address". > > > If I > > am right, would it be possible to add it? > > What's the most usef

Re: [PyQt] widget swap/widget on top

2011-07-27 Thread ad3d
While using "window modality" one must use widget.hide() and widget.show() which is not desirable for my purpose.. i need to disable widget in the background and keep top level widget enabled.. Nick Gaens wrote: > > I think you should take a look at "window modality" ( > http://doc.qt.nokia.co

Re: [PyQt] widget swap/widget on top

2011-07-27 Thread Nick Gaens
I think you should take a look at "window modality" ( http://doc.qt.nokia.com/latest/qwidget.html#windowModality-prop). On Wed, Jul 27, 2011 at 07:46, ad3d wrote: > > Hi guys, > > if i press a button on mainwindow i want another widget i.e. widget1 to > popup, but that widget1 should be on top