Qt-interest Archive, December 2007
Re: TextEditWidget bug
Message 1 in thread
On Sep 24, 2007, at 11:13 AM, Israel Brewster wrote:
> I have now tested and confirmed this bug on Mac, Windows, and Linux
> boxes, and as such am fairly certain that it is, in fact, a bug in
> Qt, especially since no one has responded to any of my postings. I
> have gone ahead and submitted it as such to trolltech.
>
> -----------------------------------------------
> Israel Brewster
> Computer Support Technician
> Frontier Flying Service Inc.
> 5245 Airport Industrial Rd
> Fairbanks, AK 99709
> (907) 450-7250 x293
> -----------------------------------------------
If anyone is interested, Trolltech responded to this bug by claiming
it is expected behavior, based on the fact that when enter is pressed
the data is submitted to the underlying data structure, and the widget
re-loaded. How they can claim that this is not a bug (regardless of
what is actually causing it) has me totally baffled, considering that
a) the behavior of the widget changes based on invisible back-end code
(talk about confusing to the user- they have no way of knowing what
behavior to expect when presented with a text field), and
b) the widget behaves differently (under these not-unusual
circumstances) than every other text entry field in the history of
computing,
but there it is. This behavior, for which I can think of no
circumstances in which it would be the desired behavior, is not a bug,
it's a feature. Therefore, it falls to us programers to work around it
every time we want to use a text field in conjunction with a database
backend. Luckily that isn't terribly difficult, but still very
aggravating.
-----------------------------------------------
Israel Brewster
Computer Support Technician
Frontier Flying Service Inc.
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7250 x293
-----------------------------------------------
>
>
>
> On Sep 20, 2007, at 9:56 AM, Israel Brewster wrote:
>
>> A week or so ago I posted about some problems I was having with a
>> TextEditWidget. Specifically, when a QDataWidgetMapper is used to
>> map a text SQL field to a TextEditWidget, and return is pressed
>> when typing in the widget, a new line is entered properly, but the
>> cursor then returns to the beginning of the widget, rather than
>> moving to the new line. This only occurs when editing an existing
>> record, if you insert a row into the model (tested with
>> QSqlTableModel and QSqlRelationalTableModel) and map the widget to
>> that, it behaves as desired. I wrote a basic 35-line app that
>> demonstrates this behavior, which occurs when compiled on both
>> windows 2000 and MacOS X 10.4.10, using Qt 4.3.0 on the mac, 4.3.1
>> on windows. Is there anything I can do to fix this? I have attached
>> my code for the demonstration, you will have to modify the database
>> settings to match up with your server/tables, of course. I have
>> tested it with both a MySql server as well as a postgresql server
>> (which the code is currently set up for) Thanks for any assistance
>> that can be provided.
>>
>> -----------------------------------------------
>> Israel Brewster
>> Computer Support Technician
>> Frontier Flying Service Inc.
>> 5245 Airport Industrial Rd
>> Fairbanks, AK 99709
>> (907) 450-7250 x293
>> -----------------------------------------------
>>
>> <TextEditTest.zip>
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
> with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
--
[ signature omitted ]