Message from discussion
How can I get the IMEI ID from the device use Qt API
Received: by 10.59.0.194 with SMTP id ba2mr2220458ved.19.1350455005725;
Tue, 16 Oct 2012 23:23:25 -0700 (PDT)
X-BeenThere: android-qt@googlegroups.com
Received: by 10.52.34.13 with SMTP id v13ls4830373vdi.3.gmail; Tue, 16 Oct
2012 23:23:23 -0700 (PDT)
Received: by 10.52.66.235 with SMTP id i11mr2684281vdt.7.1350455003834;
Tue, 16 Oct 2012 23:23:23 -0700 (PDT)
Date: Tue, 16 Oct 2012 23:23:23 -0700 (PDT)
From: Sergey Chernik <used....@gmail.com>
To: android-qt@googlegroups.com
Message-Id: <6b4722b0-cd95-4404-a7ec-1dedd583fbc9@googlegroups.com>
In-Reply-To: <CAG8B1ommt2Boibhb+PjaAC=-AaGVyCey1z1o7FDhh1jr1u4uUQ@mail.gmail.com>
References: <267660ce-0d7b-4598-b7e9-953d9fa82fa1@googlegroups.com>
<CABBGiZt40FvLh+_TuwqHLXAzqHiVoQMO+B65KN33Vwwnz0zzKA@mail.gmail.com>
<4dfde793-7a88-4123-80ff-297368343e52@googlegroups.com>
<CAG8B1ommt2Boibhb+PjaAC=-AaGVyCey1z1o7FDhh1jr1u4uUQ@mail.gmail.com>
Subject: Re: How can I get the IMEI ID from the device use Qt API
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_95_6567112.1350455003523"
------=_Part_95_6567112.1350455003523
Content-Type: multipart/alternative;
boundary="----=_Part_96_12928526.1350455003523"
------=_Part_96_12928526.1350455003523
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
QSystemDeviceInfo don't work!
.pro
CONFIG += mobility
MOBILITY += systeminfo
.cpp
#include <QApplication>
#include <QLabel>
#include <QSystemDeviceInfo>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QLabel *w = new QLabel;
w->show();
QSysInfostemDeviceInfo* deviceInfo = new QSystemDeviceInfo();
w->setText(deviceInfo->imei());
return a.exec();
}
error: 'QSysInfostemDeviceInfo' was not declared in this scope
Please Help me to solve this problem!
------=_Part_96_12928526.1350455003523
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
<pre><!--StartFragment--><span style=3D" color:#008000;">QSystemDeviceInfo =
don't work! </span><!--EndFragment--></pre><pre><span style=3D" color:#0080=
00;">.pro</span></pre><pre><pre><!--StartFragment--><span style=3D" color:#=
800080;">CONFIG</span><span style=3D" color:#c0c0c0;"> </span>+=3D<span sty=
le=3D" color:#c0c0c0;"> </span>mobility</pre><pre><span style=3D" color:#80=
0080;">MOBILITY</span><span style=3D" color:#c0c0c0;"> </span>+=3D<span sty=
le=3D" color:#c0c0c0;"> </span>systeminfo<!--EndFragment--></pre><pre><br><=
/pre><pre><span style=3D"color: rgb(0, 128, 0); ">.cpp</span></pre><pre><pr=
e><pre><!--StartFragment--><span style=3D" color:#000080;">#include</span><=
span style=3D" color:#c0c0c0;"> </span><span style=3D" color:#008000;"><=
QApplication></span></pre><pre><span style=3D" color:#000080;">#include<=
/span><span style=3D" color:#c0c0c0;"> </span><span style=3D" color:#008000=
;"><QLabel></span></pre><pre><span style=3D" color:#000080;">#include=
</span><span style=3D" color:#c0c0c0;"> </span><span style=3D" color:#00800=
0;"><QSystemDeviceInfo></span></pre><pre><br></pre><pre><span style=
=3D" color:#808000;">int</span><span style=3D" color:#c0c0c0;"> </span><spa=
n style=3D" color:#000000;">main</span><span style=3D" color:#000000;">(</s=
pan><span style=3D" color:#808000;">int</span><span style=3D" color:#c0c0c0=
;"> </span><span style=3D" color:#000000;">argc</span><span style=3D" color=
:#000000;">,</span><span style=3D" color:#c0c0c0;"> </span><span style=3D" =
color:#808000;">char</span><span style=3D" color:#c0c0c0;"> </span><span st=
yle=3D" color:#000000;">*</span><span style=3D" color:#000000;">argv</span>=
<span style=3D" color:#000000;">[])</span></pre><pre><span style=3D" color:=
#000000;">{</span></pre><pre><span style=3D" color:#c0c0c0;"> </span><sp=
an style=3D" color:#800080;">QApplication</span><span style=3D" color:#c0c0=
c0;"> </span><span style=3D" color:#000000;">a</span><span style=3D" color:=
#000000;">(</span><span style=3D" color:#000000;">argc</span><span style=3D=
" color:#000000;">,</span><span style=3D" color:#c0c0c0;"> </span><span sty=
le=3D" color:#000000;">argv</span><span style=3D" color:#000000;">);</span>=
</pre><pre><span style=3D" color:#c0c0c0;"> </span><span style=3D" color=
:#800080;">QLabel</span><span style=3D" color:#c0c0c0;"> </span><span style=
=3D" color:#000000;">*</span><span style=3D" color:#000000;">w</span><span =
style=3D" color:#c0c0c0;"> </span><span style=3D" color:#000000;">=3D</span=
><span style=3D" color:#c0c0c0;"> </span><span style=3D" color:#808000;">ne=
w</span><span style=3D" color:#c0c0c0;"> </span><span style=3D" color:#8000=
80;">QLabel</span><span style=3D" color:#000000;">;</span></pre><pre><span =
style=3D" color:#c0c0c0;"> </span><span style=3D" color:#000000;">w</spa=
n><span style=3D" color:#000000;">-></span><span style=3D" color:#000000=
;">show</span><span style=3D" color:#000000;">();</span></pre>
<pre><span style=3D" color:#c0c0c0;"> </span>QSysInfostemDeviceInfo<span=
style=3D" color:#000000;">*</span><span style=3D" color:#c0c0c0;"> </span>=
<span style=3D" color:#000000;">deviceInfo</span><span style=3D" color:#c0c=
0c0;"> </span><span style=3D" color:#000000;">=3D</span><span style=3D" col=
or:#c0c0c0;"> </span><span style=3D" color:#808000;">new</span><span style=
=3D" color:#c0c0c0;"> </span>QSystemDeviceInfo<span style=3D" color:#000000=
;">();</span></pre><pre><span style=3D" color:#c0c0c0;"> </span><span st=
yle=3D" color:#000000;">w</span><span style=3D" color:#000000;">-></span=
><span style=3D" color:#000000;">setText</span><span style=3D" color:#00000=
0;">(</span><span style=3D" color:#000000;">deviceInfo</span><span style=3D=
" color:#000000;">-></span>imei<span style=3D" color:#000000;">());</spa=
n></pre><pre><br></pre><pre><span style=3D" color:#c0c0c0;"> </span><spa=
n style=3D" color:#808000;">return</span><span style=3D" color:#c0c0c0;"> <=
/span><span style=3D" color:#000000;">a</span><span style=3D" color:#000000=
;">.</span><span style=3D" color:#000000;">exec</span><span style=3D" color=
:#000000;">();</span></pre><pre><span style=3D" color:#000000;">}</span><!-=
-EndFragment--></pre><pre><!--EndFragment--></pre><!--EndFragment--></pre><=
/pre><pre><br></pre><pre><p style=3D"margin-bottom: 0px; "><!--StartFragmen=
t--><span style=3D" color:#b00606;">error: 'QSysInfostemDeviceInfo' was not=
declared in this scope</span><!--EndFragment--></p></pre><pre><br></pre><p=
re><br></pre><pre>Please Help me to solve this problem!</pre></pre>
------=_Part_96_12928526.1350455003523--
------=_Part_95_6567112.1350455003523--