[Qgis-user] change default webbrowser in qgis3 settings?

Groene Bij mail at groenebij.nl
Tue Mar 5 00:49:33 PST 2019


Short update on this issue.

After entering QDesktopServices.openUrl(QUrl('http://qgis.org')) and seeing qgis3 opening the firefox browser, now qgis2web also always opens the firefox browser.
Restarts, new projects, old projects, now always my default browser is used. 

This solves my problem, but I have no idea what happened.
To me this is strange behavior, like the python line somehow changed a setting?

Greets,
Jeroen


-----Oorspronkelijk bericht-----
Van: Qgis-user <qgis-user-bounces at lists.osgeo.org> Namens Groene Bij
Verzonden: vrijdag 1 maart 2019 11:48
Aan: richard at duif.net; qgis-user at lists.osgeo.org
Onderwerp: Re: [Qgis-user] change default webbrowser in qgis3 settings?

This one opens Firefox...

So maybe it is an issue in qgis, I'll give it to Tom.



-----Oorspronkelijk bericht-----
Van: Richard Duivenvoorde <rdmailings at duif.net>
Verzonden: vrijdag 1 maart 2019 10:59
Aan: Groene Bij <mail at groenebij.nl>; richard at duif.net; qgis-user at lists.osgeo.org
Onderwerp: Re: [Qgis-user] change default webbrowser in qgis3 settings?

Sorry, wrong example, please try:

QDesktopServices.openUrl(QUrl('http://qgis.org'))

Richard

On 01/03/2019 10.35, Groene Bij wrote:
> Hi Richard,
> 
> Using your line in the Python Console I get the following message:
> 
> Traceback (most recent call last):
>   File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\code.py", line 90, in runcode
>     exec(code, self.locals)
>   File "<input>", line 1, in <module>
> TypeError: openUrl(QUrl): argument 1 has unexpected type 'str'
> 
> I am using 3.4.5 LTR
> 
> Greetings,
> Jeroen
> 
> -----Oorspronkelijk bericht-----
> Van: Qgis-user <qgis-user-bounces at lists.osgeo.org> Namens Richard 
> Duivenvoorde
> Verzonden: maandag 25 februari 2019 22:08
> Aan: qgis-user at lists.osgeo.org
> Onderwerp: Re: [Qgis-user] change default webbrowser in qgis3 settings?
> 
> Hi Jeroen,
> 
> I'd say: create an issue in the repo of it:
> https://github.com/tomchadwin/web2qgis/issues
> 
> I have some plugins which opened an url or file in a browser, and then used default Qt-machinery, something like:
> 
> QDesktopServices.openUrl('http://qgis.org')
> 
> What happens if you use that in the Python Console? In your QGIS 3.
> Does it open your preferred browser?
> Or does it also open IE. If last, then maybe it is a Qt setting?
> 
> Regards,
> 
> Richard Duivenvoorde
> 
> On 25/02/2019 09.43, Groene Bij wrote:
>> Hi all,
>>
>> I am sorry to repeat this question. I really hope someone can help.
>>
>> Today I did a clean install of 3.4.5 and exporting a map with the 
>> plugin qgis2web it still opens the webmap in IE. I don’t use IE, 
>> haven’t configured it and it is not my default webbrowser in Win10.
>>
>> Somehow, some setting in qgis 3 doesn’t use my default windows 
>> settings correctly.
>>
>>  
>>
>> Qgis 2.18.28 doesn’t have this problem. I also did a clean install of
>> 2.18.28 today, exported a map with the plugin and it opens in my 
>> default webbrowser which is Firefox.
>>
>>  
>>
>> Is it a bug in 3.4.5?
>>
>> Is there a setting somewhere to change the webbrowser used?
>>
>>  
>>
>>  
>>
>> Gr.
>>
>> Jeroen
>>
>>  
>>
>>  
>>
>> *Van:*Qgis-user <qgis-user-bounces at lists.osgeo.org> *Namens *Groene 
>> Bij
>> *Verzonden:* maandag 11 februari 2019 17:10
>> *Aan:* qgis-user at lists.osgeo.org
>> *Onderwerp:* [Qgis-user] qgis3 uses IE as default browser on windows10?
>>
>>  
>>
>>  
>>
>> Hi,
>>
>>  
>>
>> Is there a setting in qgis3 to change the default internet browser 
>> used by processes?
>>
>> For instance, qgis2web opens a webbrowser after exporting the webmap. 
>> In
>> qgis2.18 my default browser Firefox was opened. Now, qgis3.4.4 it opens IE.
>>
>>  
>>
>> According to Tom Chadwin (qgis2web) the plugin refers to a piece of 
>> Pyhton code when opening the webbrowser:
>>
>> The code which opens the browser when you export is:
>>
>> https://github.com/tomchadwin/qgis2web/blob/master/qgis2web/maindialo
>> g
>> .py#L342
>>
>>  
>>
>> It uses the Python webbrowsermodule:
>>
>> https://docs.python.org/3/library/webbrowser.html
>>
>>  
>>
>> I have no experience with pyhon, so I hope there is a setting 
>> somewhere to choose my default browser. Besides that, I do hope qgis3 
>> will simply follow the default settings from the OS.
>>
>>  
>>
>> Kind regards.
>>
>>
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>
> 
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
> 
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
> 


_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user



More information about the Qgis-user mailing list