Bitcoin Forum
December 05, 2016, 02:54:37 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1] 2 3 »  All
  Print  
Author Topic: Preparing for wx --> qt switch  (Read 5763 times)
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652


Chief Scientist


View Profile WWW
September 16, 2011, 03:49:34 PM
 #1

So the plan is for the next release of bitcoin to switch from the wxWidgets GUI we have now to the vastly nicer QT GUI that John Smith created.

I spent some time yesterday compiling Qt and bitcoin-qt, and some time this morning doing a very quick code review (executive summary: looks great!).

I'm mostly posting this as a brain dump of "stuff not to forget" when it is time to pull QT and remove WX.

Major behavioral differences I noticed during code review:

  • Does not generate new receiving addresses automatically (good idea, I think, but may be controversial).
  • Cannot act as a rpc client (ok with me, we'll still compile/ship a headless bitcoind)

Will-need-to-be-done stuff:

  • Find and replace or remove references to wxwidgets in documentation, makefiles, etc.
  • Change makefiles to track rpc.cpp --> bitcoinrpc.cpp name changes
  • The QT library is LGPGL licensed; do we need to change READMEs or other files?

... and probably a bunch of other little things I didn't notice or I forgot to write down.

How often do you get the chance to work on a potentially world-changing project?
1480949677
Hero Member
*
Offline Offline

Posts: 1480949677

View Profile Personal Message (Offline)

Ignore
1480949677
Reply with quote  #2

1480949677
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
Remember remember the 5th of November
Legendary
*
Offline Offline

Activity: 1526

Reverse engineer from time to time


View Profile
September 16, 2011, 04:23:12 PM
 #2

Can you provide a screenshot for a reference?

BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
bcforum
Full Member
***
Offline Offline

Activity: 140


View Profile
September 16, 2011, 04:27:38 PM
 #3

  • Cannot act as a rpc client (ok with me, we'll still compile/ship a headless bitcoind)

Can you expand on this? I currently run 'bitcoin -server' on my linux machine. This gives me the GUI for monitoring transactions and the RPC functions to support solo mining. If the RPC client is removed, I'll have to run 'bitcoin' and 'bitcoind', but there is (I think) a conflict with the port address and the second client will not run. I will also need to download and maintain two copies of the block chain (a minor annoyance)

If you found this post useful, feel free to share the wealth: 1E35gTBmJzPNJ3v72DX4wu4YtvHTWqNRbM
nelisky
Legendary
*
Offline Offline

Activity: 1554


View Profile
September 16, 2011, 04:28:58 PM
 #4


  • Cannot act as a rpc client (ok with me, we'll still compile/ship a headless bitcoind)

Is there a reason for this or is it just "the way it got coded"? It helps me somewhat to be able to have rpc to the running GUI bitcoin client. Either that or the priv key import/export *hint* Smiley

Also, this may not be the right place to ask, but why the move from wx to qt? I know a better GUI was long due, but I happen to know and like wx (have no quarrel with qt, mind you) and I don't think there's much if anything that you can do with one and not with the other...
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652


Chief Scientist


View Profile WWW
September 16, 2011, 05:07:21 PM
 #5

RE: cannot act as a RPC client:

I believe it will still be able to act as a RPC server.

So you can run the GUI with the -server switch, but you'll have to talk to it using (for example)
  bitcoind getinfo

... as opposed to today, where you can run "bitcoin -server" to get the GUI and then run "bitcoin getinfo" to talk to the running GUI process.

RE: why switch:  because no wxwidgets programmers stepped up and made it better.  And from what I can see, QT is more popular and supported (so there are more programmers able and willing to help improve).

RE: screen shots:  See the bitcoin-qt thread in the Alternative Clients sub-forum here.

How often do you get the chance to work on a potentially world-changing project?
nelisky
Legendary
*
Offline Offline

Activity: 1554


View Profile
September 16, 2011, 06:23:12 PM
 #6

So you can run the GUI with the -server switch, but you'll have to talk to it using (for example)
  bitcoind getinfo

That's perfectly acceptable. I thought the rpc server was being removed for whatever reason, but if it's just the cli client for the GUI then it makes perfect sense.


RE: why switch:  because no wxwidgets programmers stepped up and made it better.  And from what I can see, QT is more popular and supported (so there are more programmers able and willing to help improve).

That's more than fair Smiley I am not a die hard wxwidgets coder, nor a GUI coder tbh. I actually have "I suck at designing user interfaces" in my CV, though not in those exact words! I was just curious about some shortcoming of wx that I was unaware of. All good Smiley
nibor
Sr. Member
****
Offline Offline

Activity: 348


View Profile
September 16, 2011, 07:58:37 PM
 #7

Gavin,

Could you or someone provide a list of future version numbers you are intending to use?

I will then add them all in one go to the rrd charts of versions running at:
http://bitcoinstatus.rowit.co.uk/versions.html


It is very dull job adding them and I would much rather add a load in one go!


Thanks

Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652


Chief Scientist


View Profile WWW
September 16, 2011, 09:56:38 PM
 #8

Could you or someone provide a list of future version numbers you are intending to use?

0.4.0 : Out real soon (0.4.0 release candidate 2 binaries are available on sourceforge now)

0.4.1 : I'd give about a 80% chance of happening (major bug or security problem found in 0.4.0)
0.4.2 : I'd give about a 20% chance of happening (major bug or security problem found in 0.4.1)

0.5.0 : Will be the Qt release.

Beyond that...  who knows?



How often do you get the chance to work on a potentially world-changing project?
btcbaby
Member
**
Offline Offline

Activity: 87



View Profile WWW
September 16, 2011, 11:33:59 PM
 #9

QT is an awesome platform, good move.

http://www.btclog.com/uploads/FileUpload/e6/9cc97eb4c91db1ec5fb30ca35f0da8.png
Write an excellent post on btc::log and you just might win 1BTC in our daily giveaway.
btc::log is the professionally managed and community moderated Bitcoin Forum
ThiagoCMC
Legendary
*
Offline Offline

Activity: 1190


฿itcoin: Currency of Resistance!


View Profile WWW
September 17, 2011, 06:38:27 AM
 #10

Mmm...

> Does not generate new receiving addresses automatically (good idea, I think, but may be controversial).

 I like this feature. I do not want to see it removed. I like to keep track of all my "DYMANIC" and of my "STATIC" addresses... This should NOT be changed.

 BTW, I don't like QT... It is a ugly toolkit... GTK3 is much nicer... But, I appreciate the effort!!

 Anyway, do you know, more or less, when the Bitcoin core will be decoupled of the GUIs?! I mean, when will be only somekind of oficial LibBitcoin and a lots of GUIs, like QT, WX, GTK3, GTK2... Huh

Thanks!
Thiago

Mercado Forex acessível para todos os Brasileiros que tenham Bitcoins! Cadastre-se hoje mesmo! Bastar acessar aqui: https://1broker.com/m/r.php?i=8879
nibor
Sr. Member
****
Offline Offline

Activity: 348


View Profile
September 17, 2011, 11:13:56 AM
 #11

Could you or someone provide a list of future version numbers you are intending to use?

0.4.0 : Out real soon (0.4.0 release candidate 2 binaries are available on sourceforge now)

0.4.1 : I'd give about a 80% chance of happening (major bug or security problem found in 0.4.0)
0.4.2 : I'd give about a 20% chance of happening (major bug or security problem found in 0.4.1)

0.5.0 : Will be the Qt release.

Beyond that...  who knows?




So the integers will be:
40000
41000
42000
50000

This follows on from the current ones that are:
32400
32500
etc...

zwierzak
Newbie
*
Offline Offline

Activity: 24



View Profile WWW
September 17, 2011, 11:23:20 AM
 #12

BTW, I don't like QT... It is a ugly toolkit... GTK3 is much nicer... But, I appreciate the effort!!

 Anyway, do you know, more or less, when the Bitcoin core will be decoupled of the GUIs?! I mean, when will be only somekind of oficial LibBitcoin and a lots of GUIs, like QT, WX, GTK3, GTK2... Huh
BTW, I don't like GTK… It is a ugly library that needs more libraries to call it ugly toolkit… Qt is much nicer… Thanks for the effort!

Ok other thing. Do you know that in Qt you have built in GTK style? It import the current GTK system and maps it on Qt application (also with switched order od OK and Cancel in dialog box). It should be automaticly turn on if Qt detects Gnome session, but you can change it running qt-config.
ThiagoCMC
Legendary
*
Offline Offline

Activity: 1190


฿itcoin: Currency of Resistance!


View Profile WWW
September 17, 2011, 06:45:15 PM
 #13

BTW, I don't like QT... It is a ugly toolkit... GTK3 is much nicer... But, I appreciate the effort!!

 Anyway, do you know, more or less, when the Bitcoin core will be decoupled of the GUIs?! I mean, when will be only somekind of oficial LibBitcoin and a lots of GUIs, like QT, WX, GTK3, GTK2... Huh
BTW, I don't like GTK… It is a ugly library that needs more libraries to call it ugly toolkit… Qt is much nicer… Thanks for the effort!

Ok other thing. Do you know that in Qt you have built in GTK style? It import the current GTK system and maps it on Qt application (also with switched order od OK and Cancel in dialog box). It should be automaticly turn on if Qt detects Gnome session, but you can change it running qt-config.

Well, honestly, you have the point... And I agree with you... GTK have its own problems, so as QT (license issues?! Don't know anymore, in the past, yes...)...

But my point is, and I just like to have an idea about it, I'm not demanding this from anybody ok... When the Bitcoin will be detached from the GUI / Daemon? Is there any roadmap for this?!

I like to see tons of GUIs (QT, GTK3/2, ELF, OpenStep, Aqua, Windows, etc...) using the same "LibBitcoin" (from http://bitcoin.org), including the non-gui bitcoind...

BTW, what about Enlightenment Foundation Libraries?! I think it is one of the most amazing open source toolkit out there... Don't you think!? http://www.enlightenment.org/

I'm asking this because I have a draft of my own Bitcoin GUI and I'll hire two developers (friend of mine) to write the GUI... But first, I see that we need a libbitcoin or something like that befora start anything like that...

Thank you!
Thiago

Mercado Forex acessível para todos os Brasileiros que tenham Bitcoins! Cadastre-se hoje mesmo! Bastar acessar aqui: https://1broker.com/m/r.php?i=8879
wumpus
Hero Member
*****
qt
Offline Offline

Activity: 798

No Maps for These Territories


View Profile
September 18, 2011, 11:34:46 AM
 #14

I just made the big pull request: https://github.com/bitcoin/bitcoin/pull/521

  • To be clear, the Qt GUI can function as RPC server. You can mine with it, or interface to it from your favourite remote control script; just provide -server (and all other bitcoin command line arguments except -daemon).

  • It is not a RPC client. This might be added in the future (see issue #17), but in that case it will work as a graphical RPC client and not a command-line one. For the love of separation of concerns and other sound software engineering principles I'm against combining a command line RPC client and a GUI server/native client in one executable.

  • "Qt is an ugly toolkit" is BS, you can theme it any way you want with both images and vector graphics. You can even make it show in GTK themes. I chose QT not because of the graphical looks but because it is well-designed and encourages clean, maintainable code.

  • Also: as the Qt GUI is pretty much isolated from the core (only the models communicate with the core), it can serve as an example for other GUIs, or used as a starting point for moving all non-GUI code (such as lock handling) to the core and offering a nicer interface there. I did not do this because I wanted to minimize core changes.

  • What license issues? Qt is LGPL, just like GTK. Wx is similar "The wxWindows Licence is essentially the L-GPL (Library General Public Licence), with an exception stating that derived works in binary form may be distributed on the user's own terms" (http://www.wxwidgets.org/about/newlicen.htm)

Quote
I spent some time yesterday compiling Qt and bitcoin-qt, and some time this morning doing a very quick code review (executive summary: looks great!).
Thanks! Smiley

Bitcoin Core developer [PGP] Warning: For most, coin loss is a larger risk than coin theft. A disk can die any time. Regularly back up your wallet through FileBackup Wallet to an external storage or the (encrypted!) cloud. Use a separate offline wallet for storing larger amounts.
error
Hero Member
*****
Offline Offline

Activity: 574



View Profile
September 18, 2011, 12:21:08 PM
 #15

MIT code can use LGPL libraries with no legal problem. So can just about anything else. It was the whole point of the L in LGPL.

15UFyv6kfWgq83Pp3yhXPr8rknv9m6581W
justusranvier
Legendary
*
Offline Offline

Activity: 1400



View Profile WWW
September 18, 2011, 04:53:59 PM
 #16

For the love of separation of concerns and other sound software engineering principles I'm against combining a command line RPC client and a GUI server/native client in one executable.
Speaking as a non-developer user I would love to see a complete separation between the two.

It would be awesome to have a server that assumes that it will be managing the wallets of everybody on a LAN and authenticates users via PAM (or whatever they use on Windows to do the same thing) and that the GUI clients were just that and nothing more.

The windows installer could install both the service and the client at the same time so those users wouldn't even know the difference and you could even use zeroconf/avahi to make it easier for the clients to find the local server.
davux
Sr. Member
****
Offline Offline

Activity: 289


Firstbits.com/1davux


View Profile WWW
September 20, 2011, 09:14:47 PM
 #17

I'm not sure we need to switch, at least not yet. Sounds very dangerous to me not having any transitional strategy. That never works... Looking at the code and already seeing potential issues is one thing, but trying the client in real life is another one, it will unveil tons of unexpected issues. Let's be very careful, because the client is a major part (nearly 100%) of the Bitcoin network.

I'd say qt-bitcoin is (at last!) released, and people be free to use whichever client(s) they prefer. Moreover, protocols need diversity in implementations, so it's all for the better.

1DavuxH9tLqU4c7zvG387aTG4mA7BcRpp2
México (Oaxaca) – France - Leeds
piotr_n
Legendary
*
Offline Offline

Activity: 1498


aka tonikt


View Profile WWW
September 20, 2011, 09:41:06 PM
 #18

So the plan is for the next release of bitcoin to switch from the wxWidgets GUI we have now to the vastly nicer QT GUI that John Smith created.
Don't mean to break the fun, but IMO the best GUI would be browser-based, where the client only exposes HTTP server and serves some customizable HTTP/JS app. And the user's browser does the rest. Such solution would have a number of advantages.
I think Qt is a waste of time - we will still need a huge dev env to change a dot in the GUI.

Check out gocoin - my original project of a bitcoin client written in Go, with some unique features.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
Alex Zee
Member
**
Offline Offline

Activity: 112



View Profile WWW
September 20, 2011, 10:32:04 PM
 #19

... Such solution would have a number of advantages.

Such as?

I can think of a lot of disadvantages, such as slower interface response times, exposing your interface to anyone who connects to a port, debugging it in all the browsers and their different versions, interfering browser plugins and adblocks, phishing, etc. The GUI is very simple, you won't get much advantage by using a browser as your GUI, it will probably be more difficult.

I am all in favor of UI / backend split, but see no advantage in making main UI browser-based.

BTC Monitor - systray price ticker
RipTalk.org - new Ripple forum
2112
Legendary
*
Offline Offline

Activity: 1708



View Profile
September 20, 2011, 11:47:49 PM
 #20

Reading this thread it occured to me that bitcoin already has one killer application: Satoshi bitcoin client can be an excellent way to judge the competence of the applicants for a C++ programming job.

It is open source and it is fairly short. Yet its architecture is such convoluted that can be an excellent means of judging the advanced programming skills. Example: just ask an applicant what would it take to convert the wxWidgets/QT user interface to a http+ajax one. Or ask what would be required to implement a multiple wallets. Or ask to estimate the time required to replace BerkeleyDB with say Oracle.

Mad props to John Smith for having enough understanding of both UI toolkits to execute this change single-handedly.

Please comment, critique, criticize or ridicule BIP 2112: https://bitcointalk.org/index.php?topic=54382.0
Long-term mining prognosis: https://bitcointalk.org/index.php?topic=91101.0
Pages: [1] 2 3 »  All
  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!