On Fri, Oct 21, 2011 at 7:42 PM, Hugo Parente Lima
<hugo.l...@openbossa.org> wrote:
> On Friday 21 October 2011 14:45:51 anatoly techtonik wrote:
>> Thanks for the prompt replies.
>>
>> QMainWindow.setWindowTitle() doesn't help. If you take a look at `sdi`
>> application code, it already sets it:
>> https://github.com/PySide/Examples/blob/master/examples/mainwindows/sdi/sdi
>> .py#L273
>>
>> app.setApplicationName('whatevernameyouwant')
>> this doesn't help either.
>>
>>
>> Maybe there is something that should be done specifically for Fedora/Gnome
>> 3? Can anybody confirm this behaviour on other platforms?
>
> It may get the name from the .desktop file.

Thanks for all replies.
First, let me confirm that argv[0] hack works, but it seems wrong to
me. What if I will need an application path to restart it?

So I did a search and found that Gnome 3 is 'application based', not
'window based' system. And if you can't set app name in .desktop
class, you need to set the WM_CLASS X window property. It's all
described here - http://live.gnome.org/GnomeShell/ApplicationBased

Now that it is clear that Gnome 3 requires setting application name
explicitly, the question is why setApplicationName() doesn't do this?
Should I fill it as a PySide bug?


>> On Fri, Oct 21, 2011 at 5:35 PM, Lee Smith <em...@lee-smith.me.uk> wrote:
>> > I think you need QMainWindow.setWindowTitle() ?
>> >
>> > http://www.pyside.org/docs/pyside/PySide/QtGui/QWidget.html#PySide.QtGui.
>> > PySide.QtGui.QWidget.setWindowTitle
>> >
>> > Lee
>> >
>> > On 21 October 2011 14:54, anatoly techtonik <techto...@gmail.com> wrote:
>> >> Maybe I am missing something really obvious, but how to set
>> >> application name for PySide? The one that is displayed underneath the
>> >> application icon when you switch between apps with Alt-Tab.
>> >>
>> >> All examples I execute from
>> >> https://github.com/PySide/Examples/tree/master/examples/mainwindows
>> >> show filename.py instead of name. See attached screenshot - the
>> >> 'Sdi.py' name at the very top. It is Fedora 15 with Gnome 3 (I
>> >> believe) and PySide 1.0.8
>> >> --
>> >> anatoly t.
>> >>
>> >> _______________________________________________
>> >> PySide mailing list
>> >> PySide@lists.pyside.org
>> >> http://lists.pyside.org/listinfo/pyside
>>
>> _______________________________________________
>> PySide mailing list
>> PySide@lists.pyside.org
>> http://lists.pyside.org/listinfo/pyside
>
> --
> Hugo Parente Lima
> INdT - Instituto Nokia de Tecnologia
>
_______________________________________________
PySide mailing list
PySide@lists.pyside.org
http://lists.pyside.org/listinfo/pyside

Reply via email to