[Qt-interest] double to QString

Ahmed Khaled ahmed_khaled_omer at yahoo.com
Wed Jun 3 14:18:33 CEST 2009



QString str;
double x = 10.0;
str.setNum(x);


________________________________
From: "qt-interest-request at trolltech.com" <qt-interest-request at trolltech.com>
To: qt-interest at trolltech.com
Sent: Wednesday, June 3, 2009 3:11:04 PM
Subject: Qt-interest Digest, Vol 7, Issue 39

Send Qt-interest mailing list submissions to
    qt-interest at trolltech.com

To subscribe or unsubscribe via the World Wide Web, visit
    http://lists.trolltech.com/mailman/listinfo/qt-interest
or, via email, send a message with subject or body 'help' to
    qt-interest-request at trolltech.com

You can reach the person managing the list at
    qt-interest-owner at trolltech.com

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Qt-interest digest..."


Today's Topics:

   1. Re: double to QString (Jes?s Fern?ndez Prieto)
   2. Re: double to QString (Ian Thomson)
   3. Re: is it possible to get a non-changing winId? (Denis Dzyubenko)
   4. Re: QT embedded linux framebuffer (Anil H)
   5. Re: Cross compilation of QT embedded on ARM (Anil H)


----------------------------------------------------------------------

Message: 1
Date: Wed, 3 Jun 2009 12:42:58 +0200
From: Jes?s Fern?ndez Prieto <jsfdez at gmail.com>
Subject: Re: [Qt-interest] double to QString
To: Sujan Dasmahapatra <sdh at lmglasfiber.com>
Cc: qt-interest at trolltech.com
Message-ID:
    <a4cd95ad0906030342t1a1b31f3ufbe6291f27878cff at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

You need to use the static function
QString::number<http://doc.trolltech.com/4.5/qstring.html#number-2>
.

double number=0.0;
QString str=QString::number(number);



On Wed, Jun 3, 2009 at 12:39 PM, Sujan Dasmahapatra <sdh at lmglasfiber.com>wrote:

>  Dear Friends how to convert a double to QString.
>
> double value;
>
> QString valueString;
>
>
>
> How to convert  double value to QString.
>
>
>
> Kind regards,
> LM Glasfiber R&D (India) Pvt. Ltd.
>
> Sujan Dasmahapatra
> Project Engineer - CFD
>
> Telephone: +91 80 66470248
> Mobile:
> E-mail: sdh at lmglasfiber.com
>
>
>
>
>
>
>
>
>
> --------------------------------------------------------------
>
> This e-mail and any attachments are confidential. If you are not the named
> or intended recipient, please notify the sender immediately and do not
> disclose the contents to any other person, use it for any purpose or store
> or copy the information in any medium. Any unauthorized disclosure, use or
> storage is prohibited and might be unlawful.
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.trolltech.com/pipermail/qt-interest/attachments/20090603/30b71cce/attachment-0001.html 

------------------------------

Message: 2
Date: Wed, 03 Jun 2009 11:46:49 +0100
From: Ian Thomson <Ian.Thomson at iongeo.com>
Subject: Re: [Qt-interest] double to QString
To: qt-interest at trolltech.com
Message-ID: <4A265499.8060000 at iongeo.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Sujan Dasmahapatra wrote:
> Dear Friends how to convert a double to QString.

http://lmgtfy.com/?q=double+to+QString&l=1



------------------------------

Message: 3
Date: Wed, 3 Jun 2009 13:00:07 +0200
From: Denis Dzyubenko <denis.dzyubenko at trolltech.com>
Subject: Re: [Qt-interest] is it possible to get a non-changing winId?
To: Qt-Interest <qt-interest at trolltech.com>
Message-ID: <4A2657B7.9050102 at trolltech.com>
Content-Type: text/plain;    charset="US-ASCII";    format="flowed"

Hi,

Ross Bencina wrote:
> I am on MS Windows, and trying to use a QWidget to host a 3rd-party plugin 
> which needs a parent HWND. This has been working mostly but one plugin 
> author is reporting that the HWND which I get from QWidget::winId()  is 
> becoming invalid (so I guess this is in line with the Qt documentation).
> 
> My question is: is there any way to stop Qt reallocating the HWND and get it 
> to keep the same HWND for the entire life of the QWidget? Is there any other 
> way I can integrate a standard windows handle into Qt? Would WA_NativeWindow 
> help?

setting WA_NativeWindow attribute makes sure that the widget will have a 
native window id (instead of using being non-native ("alien") and 
drawing itself on it's toplevel window id).

However winId() shouldn't change unless you reparent a widget, or 
hide/show it several times.

In worst case you can try create a native window id manually and attach 
it to QWidget with a QWidget::create() function.

-- 
Denis Dzyubenko
Software Engineer
Nokia, Qt Software


------------------------------

Message: 4
Date: Wed, 3 Jun 2009 17:37:02 +0530
From: Anil H <dspinside at gmail.com>
Subject: Re: [Qt-interest] QT embedded linux framebuffer
To: Srdjan Todorovic <todorovic.s at googlemail.com>
Cc: qt-interest <qt-interest at trolltech.com>
Message-ID:
    <d2b896ae0906030507o44620551kf58dc52260dbaeff at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi Srdjan,

Thanks for the info.
I  created a symbolic link using
ln -s /dev/fb/0 /dev/fb0
and was to run the application without changing the source files

Thanks and regards
Anil
On Wed, Jun 3, 2009 at 3:26 PM, Srdjan Todorovic <todorovic.s at googlemail.com
> wrote:

> Hi,
>
> On 03/06/2009, Anil H <dspinside at gmail.com> wrote:
> > I changed the framebuffer path from "/dev/fb0"   to "dev/fb/0".
> > Then the examples worked fine.
> > Is there any runtime configurations parameters to change the framebuffer
> > device path instead of changing the source and rebuilding?
>
> You could configure udev (if your system is using it) to create the
> /dev/fb0 device node, or you could symlink /dev/fb/0 to /dev/fb0.
>
> I'm not sure if there's a Qt runtime option you could use - have you
> checked the API docs?
>
> Srdjan
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.trolltech.com/pipermail/qt-interest/attachments/20090603/8494a6ad/attachment-0001.html 

------------------------------

Message: 5
Date: Wed, 3 Jun 2009 17:40:51 +0530
From: Anil H <dspinside at gmail.com>
Subject: Re: [Qt-interest] Cross compilation of QT embedded on ARM
To: qt-interest at trolltech.com
Message-ID:
    <d2b896ae0906030510h79cc0759i50e35890f10cfdb8 at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi,
I added some more flags as given below while configuring
--embedded=arm -qt-kbd-usb -qt-mouse-linuxtp
Alignment trap doesn't occur in the rebuilt library and application

Thanks and regards
Anil



On Tue, Jun 2, 2009 at 8:04 PM, Anil H <dspinside at gmail.com> wrote:

> Hi ,
>
> Thanks for the info.
> I was able to build the QT library and examples on arm using -platform
> option.
>
> ./configure  *-platform qws/linux-x86-g++* *-xplatform qws/linux-arm-g++*--prefix=/home/anil/qt_4_5_1/qt_install/ --static --shared  -qt-gif
> -qt-libpng -qt-libjpeg -qt-freetype -little-endian -release -no-qt3support
> -no-libtiff -no-libmng -no-nis  -no-cups  -no-iconv -no-pch -no-dbus
> -no-separate-debug-info -no-mmx -no-3dnow -no-sse -no-sse2 -armfpa
> -no-xmlpatterns -no-phonon -no-svg -no-webkit
>
> When I tried to run the example applications like analog clock on arm, It
> executed successfully. But most of the example applications like Image
> viewer gave alignment traps while execution when I moved the mouse on menu
> list which contained "File" "View" and "Help".
>
> ./imageviewer -qws
> Cannot open keyboard: No such file or directory
> Alignment trap: imageviewer (1236) PC=0x40317d60 Instr=0xe1dc50b1
> Address=0x0012
> eab1 FSR 0x013
> Bus error
>
> Why does the alignment trap occur when i move mouse over the menu ?
> How to avoid it ?
>
> Thanks and regards
> Anil
>
>
>
>
>
>
>
> On Mon, Jun 1, 2009 at 3:06 PM, Kurt Yang <jieshuzheng at gmail.com> wrote:
>
>> try the -platform option?
>>
>> On Mon, Jun 1, 2009 at 5:07 PM, Anil H <dspinside at gmail.com> wrote:
>> > Hi,
>> >
>> >
>> > I was cross-compiling Qt embedded 4.5.1 on  a linux PC.
>> >
>> > ./configure -embedded arm -xplatform qws/linux-arm-g++
>> >
>> >
>> >
>> > It compiled qmake and then tried to execute it.
>> >
>> > However since it was cross-compiled for a embedded target(arm) and
>> >
>> > tried to execute it on x86, it failed. How to compile qmake for native
>> > x86-Linux PC
>> >
>> > and rest of the library for target(arm)?
>> >
>> >
>> >
>> > Regards
>> >
>> > Anil
>> >
>> > _______________________________________________
>> > Qt-interest mailing list
>> > Qt-interest at trolltech.com
>> > http://lists.trolltech.com/mailman/listinfo/qt-interest
>> >
>> >
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.trolltech.com/pipermail/qt-interest/attachments/20090603/c5c9ce15/attachment.html 

------------------------------

_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest


End of Qt-interest Digest, Vol 7, Issue 39
******************************************



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090603/6b2cf520/attachment.html 


More information about the Qt-interest-old mailing list