Re: [QGIS-Developer] Signals and QtDesigner
Thanks Nyall!!! El jue, 29 feb 2024 a las 22:01, Nyall Dawson () escribió: > > > On Fri, 1 Mar 2024, 5:02 am Jorge Tornero via QGIS-Developer, < > qgis-developer@lists.osgeo.org> wrote: > >> Hello all, >> >> I write the list because I have a a simple question (currently I'm trying >> to tackle issue #56275 Improve Parsing of Data from Serial Port Sensors). >> >> Is using the QtDesigner signal/slot assignment facilities discouraged? >> I've read this in the QGIS coding standards guide and don't really know if >> that means that: >> >> *Avoid use of Qt auto connect slots (i.e. those named void >> on_mSpinBox_valueChanged).* >> >> So, If I need to connect two widgets in a groupBox (a radioButton and a >> QLineEdit, just to enable the QLineEdit only a determinate radioButton is >> selected), should I make it programatically instead using QtDesigner? >> > > I realise you posted a follow up, but just to confirm -- yes, do NOT rely > on connections made in the designer. > > The rationale is that the designer can break these connections without any > warning. Eg if you cut and paste some widgets to move them around, any > connections to those will be silently broken. It's much safer to rely on > manual connections with compile time checks... > > Nyall > >> >> >> Thanks a lot >> >> Jorge >> ___ >> 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] Signals and QtDesigner
On Fri, 1 Mar 2024, 5:02 am Jorge Tornero via QGIS-Developer, < qgis-developer@lists.osgeo.org> wrote: > Hello all, > > I write the list because I have a a simple question (currently I'm trying > to tackle issue #56275 Improve Parsing of Data from Serial Port Sensors). > > Is using the QtDesigner signal/slot assignment facilities discouraged? > I've read this in the QGIS coding standards guide and don't really know if > that means that: > > *Avoid use of Qt auto connect slots (i.e. those named void > on_mSpinBox_valueChanged).* > > So, If I need to connect two widgets in a groupBox (a radioButton and a > QLineEdit, just to enable the QLineEdit only a determinate radioButton is > selected), should I make it programatically instead using QtDesigner? > I realise you posted a follow up, but just to confirm -- yes, do NOT rely on connections made in the designer. The rationale is that the designer can break these connections without any warning. Eg if you cut and paste some widgets to move them around, any connections to those will be silently broken. It's much safer to rely on manual connections with compile time checks... Nyall > > > Thanks a lot > > Jorge > ___ > 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
[QGIS-Developer] Signals and QtDesigner (2)
Hi again, sorry but I have a idea... I compiled QGIS and realized that signals connections made with QtDesigner are compiled into old style signal-slot connection: QObject::connect(mCustomDelimiterOption, SIGNAL(toggled(bool)), mCustomDelimiterText, SLOT(setEnabled(bool))); What is also forbidden by QEP #77. So I guess this answers my question. Thanks a lot anyway. Jorge ___ 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] Signals and QtDesigner
Hello all, I write the list because I have a a simple question (currently I'm trying to tackle issue #56275 Improve Parsing of Data from Serial Port Sensors). Is using the QtDesigner signal/slot assignment facilities discouraged? I've read this in the QGIS coding standards guide and don't really know if that means that: *Avoid use of Qt auto connect slots (i.e. those named void on_mSpinBox_valueChanged).* So, If I need to connect two widgets in a groupBox (a radioButton and a QLineEdit, just to enable the QLineEdit only a determinate radioButton is selected), should I make it programatically instead using QtDesigner? Thanks a lot Jorge ___ 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] Qt6 python plugins: visual hint in PluginManager plugin list?
Il 29/02/2024 13:00, Richard Duivenvoorde via QGIS-Developer ha scritto: And pop up the attached screenshot. I think the error message "The plugin is not compatible with this version of QGIS. It's designed for QGIS versions: Plugin does not support Qt6 versions of QGIS" should also be tweaked. ___ 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] Qt6 python plugins: visual hint in PluginManager plugin list?
Hi, Maybe it is a little too early, as not so many people will be able to test Qt6 builds of QGIS? But I have one :-) And I upgraded a first plugin that is working both in Qt5 and Qt6 [0] Now I'm wondering if there should be some visual cue, when working with a Qt6 build, when searching for plugins. 99.9% of the plugins will not work :-( And pop up the attached screenshot. Any idea's on how to handle this user friendly? Hiding the Qt5 plugins does not seem a good idea (to me). Maybe 'graying' out all plugins that do not have `supportsQt6=yes` in their metadata is easiest, and would maybe users ask for Qt6 upgrades to plugin authors? Alternative would be some checkbox/filter for Qt5/Qt6 plugins/ Other idea's, or should we/I just not bother? Regards, Richard Duivenvoorde [0] https://github.com/rduivenvoorde/pdokservicesplugin/commits/___ 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