[Qgis-developer] How to modify QGIS UI at start?

db-esm david at esmarkets.com
Fri May 3 06:52:38 PDT 2013


This is from a .bat file:

start "Quantum GIS" /B "%OSGEO4W_ROOT%"\apps\qgis\bin\qgis.exe --configpath
"%cd%\QUANTU~1\Esm.ini"

I notice in the example you mentioned that you are not using a file name
with --configpath, you're using only a path.
Is there a specific file name that must be used?

Thanks for the help.

David



Nathan Woodrow wrote
> David,
> 
> Can you paste the command line call you are using.
> 
> --configpath does work, I use it one of my projects here
> https://github.com/NathanW2/qmap/blob/master/src/loader_src/qmap.bat
> 
> - Nathan
> 
> 
> On Fri, May 3, 2013 at 11:15 PM, db-esm <

> david@

> > wrote:
> 
>> When I try to use "code" or "customizationfile" as a command line option,
>> I
>> get an error message like:
>> "The layer C:\Users\Public\ThumbImage\--code is not a valid layer and
>> cant
>> not be added to the map"
>>
>> The "--configpath" option doesn't result in an error message, but has no
>> effect: the UI settings are still read from (and written to) the Windows
>> registry.
>>
>> Perhaps on Windows, QSettings always uses the registry now?
>>
>> David
>>
>>
>>
>> Nathan Woodrow wrote
>> > Yes it works on all platforms.
>> >
>> > - Nathan
>> >
>> >
>> > On Thu, May 2, 2013 at 11:31 PM, db-esm <
>>
>> > david@
>>
>> > > wrote:
>> >
>> >> Does this work on Windows?
>> >>
>> >> Sorry, I should have mentioned from the beginning that we're on
>> Windows.
>> >>
>> >> David
>> >>
>> >>
>> >>
>> >> Nathan Woodrow wrote
>> >> > If you save the ini file out and edit it by hand.  It's just a bunch
>> of
>> >> > true and false switches.  You can can then load QGIS using the
>> >> > --customizationfile your.ini option and it will change the UI on
>> load
>> >> >
>> >> > QGIS can also take a --code yourpythonfile.py that will run after
>> the
>> >> > project is loaded.
>> >> >
>> >> > - Nathan
>> >> >
>> >> >
>> >> > On Thu, May 2, 2013 at 5:22 PM, Marco Bernasocchi
>> >> > <
>> >>
>> >> > marco@
>> >>
>> >> > >wrote:
>> >> >
>> >> >> On 05/01/2013 08:19 PM, db-esm wrote:
>> >> >>
>> >> >>> Yes, but we need to have this happen automatically without users
>> >> having
>> >> >>> to do
>> >> >>> it manually.
>> >> >>>
>> >> >>>  IIRC you can deploy a customization.ini file, it will be read at
>> >> >>> startup
>> >> >>
>> >> >> ciao
>> >> >>
>> >> >>
>> >> >>>
>> >> >>> --
>> >> >>> View this message in context: http://osgeo-org.1560.x6.**
>> >> >>>
>> >>
>> nabble.com/How-to-modify-QGIS-**UI-at-start-tp5050659p5050686.**html<http://osgeo-org.1560.x6.nabble.com/How-to-modify-QGIS-UI-at-start-tp5050659p5050686.html&gt
>> >> ;
>> >> >>> Sent from the Quantum GIS - Developer mailing list archive at
>> >> >>> Nabble.com.
>> >> >>> ______________________________**_________________
>> >> >>> Qgis-developer mailing list
>> >> >>>
>> >>
>> >> > Qgis-developer at .osgeo
>> >>
>> >> >>>
>> >>
>> http://lists.osgeo.org/**mailman/listinfo/qgis-**developer<http://lists.osgeo.org/mailman/listinfo/qgis-developer&gt
>> >> ;
>> >> >>>
>> >> >>>
>> >> >>
>> >> >> --
>> >> >> Marco Bernasocchi
>> >> >> http://opengis.ch
>> >> >>
>> >> >> ______________________________**_________________
>> >> >> Qgis-developer mailing list
>> >> >>
>> >>
>> >> > Qgis-developer at .osgeo
>> >>
>> >> >>
>> >>
>> http://lists.osgeo.org/**mailman/listinfo/qgis-**developer<http://lists.osgeo.org/mailman/listinfo/qgis-developer&gt
>> >> ;
>> >> >>
>> >> >
>> >> > _______________________________________________
>> >> > Qgis-developer mailing list
>> >>
>> >> > Qgis-developer at .osgeo
>> >>
>> >> > http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://osgeo-org.1560.x6.nabble.com/How-to-modify-QGIS-UI-at-start-tp5050659p5050959.html
>> >> Sent from the Quantum GIS - Developer mailing list archive at
>> Nabble.com.
>> >> _______________________________________________
>> >> Qgis-developer mailing list
>> >>
>>
>> > Qgis-developer at .osgeo
>>
>> >> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> >>
>> >
>> > _______________________________________________
>> > Qgis-developer mailing list
>>
>> > Qgis-developer at .osgeo
>>
>> > http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://osgeo-org.1560.x6.nabble.com/How-to-modify-QGIS-UI-at-start-tp5050659p5051179.html
>> Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
>> _______________________________________________
>> Qgis-developer mailing list
>> 

> Qgis-developer at .osgeo

>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
> 
> _______________________________________________
> Qgis-developer mailing list

> Qgis-developer at .osgeo

> http://lists.osgeo.org/mailman/listinfo/qgis-developer





--
View this message in context: http://osgeo-org.1560.x6.nabble.com/How-to-modify-QGIS-UI-at-start-tp5050659p5051188.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.


More information about the Qgis-developer mailing list