Bitcoin Forum
July 28, 2017, 06:49:43 PM *
News: BIP91 seems stable: there's probably only slightly increased risk of confirmations disappearing. You should still prepare for Aug 1.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Access from Qt  (Read 612 times)
giantdragon
Legendary
*
Offline Offline

Activity: 1554



View Profile
July 03, 2011, 12:01:18 PM
 #1

I want to access BitCoin wallet using JSON from my Qt application.
I started server, connected via QTcpSocket and send test command, but no response received.
Socket's state is connected. May be serialization problem (I used QDataStream)?
1501267783
Hero Member
*
Offline Offline

Posts: 1501267783

View Profile Personal Message (Offline)

Ignore
1501267783
Reply with quote  #2

1501267783
Report to moderator
1501267783
Hero Member
*
Offline Offline

Posts: 1501267783

View Profile Personal Message (Offline)

Ignore
1501267783
Reply with quote  #2

1501267783
Report to moderator
1501267783
Hero Member
*
Offline Offline

Posts: 1501267783

View Profile Personal Message (Offline)

Ignore
1501267783
Reply with quote  #2

1501267783
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1501267783
Hero Member
*
Offline Offline

Posts: 1501267783

View Profile Personal Message (Offline)

Ignore
1501267783
Reply with quote  #2

1501267783
Report to moderator
1501267783
Hero Member
*
Offline Offline

Posts: 1501267783

View Profile Personal Message (Offline)

Ignore
1501267783
Reply with quote  #2

1501267783
Report to moderator
giantdragon
Legendary
*
Offline Offline

Activity: 1554



View Profile
July 03, 2011, 12:54:13 PM
 #2

Connected using HTTP protocol with QNetworkAccessManager.
giantdragon
Legendary
*
Offline Offline

Activity: 1554



View Profile
July 03, 2011, 01:00:49 PM
 #3

Sample query:

net = new QNetworkAccessManager(this);
connect(net, SIGNAL(finished(QNetworkReply*)), this, SLOT(finished(QNetworkReply*)));
QByteArray data("{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getinfo\", \"params\": [] }");
net->post(QNetworkRequest(QUrl("http://my_username:my_password@localhost:8332")), data);
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!