[PyKDE] setCaption for windows version

Gerard Vermeulen gvermeul at grenoble.cnrs.fr
Mon Oct 27 08:44:01 GMT 2003


On Thu, 23 Oct 2003 09:48:59 -0700
James Lamanna <jamesl at appliedminds.com> wrote:

> I've noticed that setCaption() doesn't appear to be working in the 
> NC-Windows version of PyQt.
> Using this test program:
> 
>  from qt import *
> import sys
> class MyWidget(QMainWindow):
>       def __init__(self):
>             QMainWindow.__init__(self,None,'',Qt.WDestructiveClose)
>             self.setCaption( self.tr("Internationalization Example" ) );
> 
> if __name__ == '__main__':
>       a = QApplication(sys.argv)
>       QObject.connect(a,SIGNAL('lastWindowClosed()'),a,SLOT('quit()'))
> 
>       w = MyWidget()
>       a.setMainWidget(w)
>       w.show()
>       a.exec_loop()
> 
> the caption never changes from 'python'.
> Any idea how to get the window title to actually change?
> Please CC me for I am not subscribed to the list.
> Thank you.

I am sure that it works without the self.tr() call.  However, you'll see
an annoying "[FreeWare] Internationalization Example", but I think that
is a feature of Qt-NC.

Gerard




More information about the PyQt mailing list