Re: [QGIS-Developer] QGIS WebSocket

2023-05-13 Thread Nathan Woodrow via QGIS-Developer
Hi,

You can use the QWebSocket (https://doc.qt.io/qt-6/qwebsocket.html) object
to do this.  Ships with Qt and QGIS.  I did some R with it a while ago
and it worked well.

- Nathan

On Sat, 13 May 2023 at 19:48, Nzikou, Michel via QGIS-Developer <
qgis-developer@lists.osgeo.org> wrote:

> Hi dev folks,
>
> I am working on creating a connection between my exp plugin and server via
> a WebSocket connection for data transferring. So my question is about
> whether QGIS has a WebSocket feature/ connect algorithm.
>
> Thanks
>
>
> *Michel Nzikou, Ph.D.*
> ASEG WA - President
> *-*
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] QGIS WebSocket

2023-05-13 Thread Nzikou, Michel via QGIS-Developer
Hi dev folks,

I am working on creating a connection between my exp plugin and server via
a WebSocket connection for data transferring. So my question is about
whether QGIS has a WebSocket feature/ connect algorithm.

Thanks


*Michel Nzikou, Ph.D.*
ASEG WA - President
*-*
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] PyQGIS read project from postgresql database

2023-05-13 Thread Alexandre Neto via QGIS-Developer
Hi,

Actually, after I turned off the computer, I saw the fileName() method in 
documentation.

I tried it and I realised that both my password and project name needed percent 
encoding some characters.

So I have parsed my uri string with urllob.parse.quote to make it work 
correctly.

Not sure if there's a more convenient way to do it.

Thanks for the help German.

Alex Neto

On Sat May 13, 2023, 02:23 AM GMT, Germán Carrillo 
 wrote:
> Hi,
>
> what do you get if you run the following line on your QGIS Python console in 
> a QGIS session where your project (the one stored in PG) is loaded?
>
> QgsProject.instance().fileName()
>
> Regards,
>
> Germán
>
>
> El vie, 12 may 2023 a las 19:22, Alexandre Neto via QGIS-Developer 
> (mailto:qgis-developer@lists.osgeo.org>>) 
> escribió:
>> Hi,
>>
>> I am trying to read a project that is stored in a postgreSQL/PostGIS 
>> database, but I am struggling with getting it correctly. I am using the 
>> following code
>>
>> project = QgsProject.instance()
>> uri = 
>> 'postgresql://my_user:my_pass@localhost:5432?sslmode=disable=my_database=my_schema=my_project_name'
>> project.read(uri)
>>
>> The last command always return false, and no project is loaded
>>
>> The documentation of QgsProject.read() only mentions filenames, not uri, but 
>> this answer seems to propose this uri format that would work:
>>
>> https://gis.stackexchange.com/a/354615/6191 
>> 
>>
>> Any suggestions on how to solve or debug this? I get no error messages from 
>> the read method.
>>
>> Thanks,
>>
>> Aleandre Neto
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org 
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
>> 
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
>> 
>
>
> --
> ---
> |\__
> (:>__)(
> |/
> Soluciones Geoinformáticas Libres
> http://geotux.tuxfamily.org/ 
> https://twitter.com/GeoTux2 
>
>
[image] ___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer