adding torrent support to your qt project

11 oct 2010

motivation

adding torrent support for a qt project should be as easy as using QHttp (IMHO). as there is no QTorrent base class in qt network yet one can use the qt torrent example [1].

i’ve modified [1] to create a gui-less torrent downloader as i was searching for an issue with that example. my problem was that [1] worked nicely but my adaption of the torrent code did not.

it connected to the tracker and it reported that there was a peer but it did never find a seed.

a few hours later i found the solution to that problem: one has to initialize the upload/download rates (as the default value is 0).

anyway: [2] features a very minimal codebase which is very easy to adapt to your qt project.

update: i’ve already reported this issues at [3]

article source