PyQt4 - widget signal trouble
Joacim Thomassen
joacim at net.homelinux.org
Sat Apr 25 13:54:42 EDT 2009
Den Fri, 24 Apr 2009 22:24:46 +0100, skrev Phil Thompson:
> On Fri, 24 Apr 2009 12:37:02 -0500, Joacim Thomassen
> <joacim at net.homelinux.org> wrote:
>> Hello,
>>
>> I'm trying to get my first PyQt4 application to work as intended, but
>> it seems I'm stuck and out of ideas for now.
>>
>> The program is a simple GUI showing an image. If the image on disk
>> change
>
>> my intension is that the displayed image in my application also change
>> accordingly.
>>
>> What works: The filesystem change is detected and my program prints out
>> "Change happened!"
>>
>> what is the problem: The image shown in the application is not changed.
>>
>> What am I doing wrong here? Any ideas and suggestions are appreciated.
>
> I don't know if it is the cause but 2 of your super() calls use the
> wrong class.
>
> Phil
Thanks,
I changed the super() call for Watcher to QObject and MainWindow to
QMainWindow, but it did not seem to directly help me closer to my goal. I
still only get the "Change happened!" printed to stdout as I exit my
application. No change is seen as long as the widget is shown. And the
image file image.jpg overwritten on the file system did not reload in my
application.
Joacim
More information about the Python-list
mailing list