[Qgis-developer] Edit UI doesn't load the field's value

Giuseppe Sucameli sucameli at faunalia.it
Wed Dec 8 04:17:30 EST 2010


Hi,

On Wed, Dec 8, 2010 at 8:36 AM, Bernhard Ströbl <Bernhard.Stroebl at jena.de>wrote:

> no, I did not file a ticket for this, although I would support doing so.

I've filed it, here the ticket: #3308 [1]

Best regards.

[1] https://trac.osgeo.org/qgis/ticket/3308

If I customize the default edit-ui via "Layer Properties" - "Attributes" and
> choose a "value map" for a numerical field the resulting ComboBox shows the
> Strings I define but saves the values to the layer's table. I had expected
> the same behaviour with a custom ui but nope.
>
> Giuseppe Sucameli schrieb:
>
>> Hi Bernhard,
>>
>>
>> On Tue, Dec 7, 2010 at 7:56 AM, Bernhard Ströbl <Bernhard.Stroebl at jena.de<mailto:
>> Bernhard.Stroebl at jena.de>> wrote:
>>
>>    I can confirm this behaviour QGIS 1.5/WinXP, data from PostGIS
>>    database.
>> Did you file a ticket yet?
>>    My workaround is to have e.g. the QComboBox filled with values and
>>    _additionally_ have a QTextLine named the same as the field in my
>>    layer table holding the feature's current value. The QTextLine is
>>    not visible to the user but gets changed if the user changes the
>>    choice in the QComboBox by Qt'S Signal/Slot mechanism.
>>
>> You're right, I understand that a developer can use the initFunction and
>> editForm
>> from API to bypass the issue, but how can users do the same?
>>
>
> I do not think they can right now. They would need to do some Python
> scripting, a very good descrtiption is here:
> http://www.osgeo.org/pipermail/qgis-developer/2010-January/008731.html
>
> regards
>
> Bernhard
>
>
>> Thinking like an user, if I sets the edit UI from the layer property
>> dialog, the obvious
>> behaviour is that each combo must be populated and it must show the right
>> value
>> as the lineedit does.
>>
>> If the combobox (but also the spinbox) doesn't show the right value, then
>> it's a bug.
>> Maybe did I start a thread on the wrong ML? Maybe I did.
>> But I hope we'll fix it quickly :)
>>
>> Let me know if there's a opened ticket, otherwise I file a new one.
>> Thanks, and best regard.
>>
>>    all the best
>>
>>    Bernhard
>>
>>    Giuseppe Sucameli schrieb:
>>
>>        Hi all,
>>        it seems there is a problem with Edit UI dialog.
>>
>>        I have an .UI which contains a combobox and a spinbox.
>>        When I edit a row using the Edit UI dialog, the combobox
>>        PROVINCIA loads
>>        all the values of the PROVINCIA field, but doesn't select the
>>        current row value.
>>        The spinbox does the same, it doesn't load the current value.
>>
>>        If I use lineedits instead, it works and loads the fields' value.
>>
>>        Loading only doesn't work, because if I change the value and and
>>        press OK
>>        the dialog stores the new value back into the field.
>>
>>        Does anybody confirm??
>>        Cheers.
>>
>>        --         Giuseppe Sucameli
>>
>>
>>
>>  ------------------------------------------------------------------------
>>
>>        _______________________________________________
>>        Qgis-developer mailing list
>>        Qgis-developer at lists.osgeo.org
>>        <mailto:Qgis-developer at lists.osgeo.org>
>>
>>        http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>>
>>        ________ Information from NOD32 ________
>>        This message was checked by NOD32 Antivirus System for Linux
>>        Mail Server.
>>        http://www.nod32.com
>>
>>
>>
>>    ________ Information from NOD32 ________
>>    This message was checked by NOD32 Antivirus System for Linux Mail
>>    Server.
>>    http://www.nod32.com
>>
>>
>>
>>
>> --
>> Giuseppe Sucameli
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>>
>> ________ Information from NOD32 ________
>> This message was checked by NOD32 Antivirus System for Linux Mail Server.
>> http://www.nod32.com
>>
>
>
>
> ________ Information from NOD32 ________
> This message was checked by NOD32 Antivirus System for Linux Mail Server.
> http://www.nod32.com
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 
Giuseppe Sucameli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20101208/c88e388f/attachment.html


More information about the Qgis-developer mailing list