[Qt-interest] String issue

Paul Colby qt at colby.id.au
Thu Sep 17 07:07:47 CEST 2009


Try using QString::trimmed (or even QString::simplified) on the
country straight after reading it from csv - ie before you use it as a
QHash key.

pc.

On Thu, Sep 17, 2009 at 2:21 PM, Yuvaraj R <yuvaraj at ongobiz.com> wrote:
> Thanks for your reply
>
> Actually i have read the  country codes from csv file , and stored in hash
> table , here country is key.
>
> When user the select the country.
>
> I take the corresponding code code from hash table and adding the mobile
> number string
>
>
> How do i solve this issue  ?
>
>
> Thanks
>
> Yuvaraj R
>
> On Thu, Sep 17, 2009 at 1:00 AM, Scott Aron Bloom <Scott.Bloom at sabgroup.com>
> wrote:
>>
>> You have an end of line character in your country_code table...
>>
>>
>>
>> -----Original Message-----
>> From: qt-interest-bounces at trolltech.com
>> [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Yuvaraj R
>> Sent: Wednesday, September 16, 2009 12:00 PM
>> To: qt-interest
>> Subject: [Qt-interest] String issue
>>
>> Hi All
>>
>> I stored the country codes in hash table
>>
>> when i ma getting the country with and appending with some other string
>>
>> it is displaying the appended string in new line
>>
>> example
>>
>> qDebug() <<
>> country_code[ui->country_code_box->currentText()]+ui->lineEdit->text();
>>
>> output is :
>>
>>  93
>> 9845536519
>>
>> but i need 939845536519
>>
>>
>>
>> what i have do here ?
>>
>> please help me
>>
>> Thanks
>>
>> Yuvaraj R
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>



-- 
http://colby.id.au




More information about the Qt-interest-old mailing list