[Qgis-developer] unable to change the qgis version 1.7 window
icon and window title from outside
Tim Sutton
lists at linfiniti.com
Thu Sep 8 08:01:04 EDT 2011
Hi
On Wed, Sep 7, 2011 at 4:55 PM, Ankur Sinha <vicky.pydeveloper at gmail.com> wrote:
> Dear sir ..
> as i am a beginner to qgis i am getting problem in changing the title and
> icon of the qgis ..
> i am trying to write a code which changes the same
>
> #-------------------------
> import sys
> import os
> from PyQt4.QtCore import *
> from qgis.core import *
> from qgis.gui import *
> from qgis.utils import *
> import time
> import math
>
>
> # Creating Class
>
> class callQgis():
> def __init__(self):
> iface = qgis.utils.iface
> iface.mainWindow().setWindowTitle("ankur workhard")
> os.system('qgis.exe')
>
> if __name__ == "__main__":
> cQgis = callQgis()
>
You try to run qgis as a shell process after you tried to change the
window title. That doesnt make sense to me since to use iface, you
already need to have a qgis instance available.....
By the way, if you type
qgis.utils.iface.mainWindow().setWindowTitle("ankur workhard")
In the qgis python console it does what you expect.
Regards
Tim
Regards
Tim
>
> #---------------------------------------
> Qgis is not getting called and no error is coming , I am able to change
> these things from inside the qgis ver 1.7
>
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
--
Tim Sutton - QGIS Project Steering Committee Member (Release Manager)
==============================================
Please do not email me off-list with technical
support questions. Using the lists will gain
more exposure for your issues and the knowledge
surrounding your issue will be shared with all.
Visit http://linfiniti.com to find out about:
* QGIS programming and support services
* Mapserver and PostGIS based hosting plans
* FOSS Consulting Services
Skype: timlinux
Irc: timlinux on #qgis at freenode.net
==============================================
More information about the Qgis-developer
mailing list