Skip to main content

Ralsina.Me — Roberto Alsina's website

DeVicenzo 2

A long time ago I "wrote a web browser". Those there are some very heavy quotes. You may imag­ine me do­ing air quotes while I write it, may­be?

That's be­cause I did­n't re­al­ly, what I ac­tu­al­ly did was write UI around Qt's we­bkit-based wid­get. It was a fun pro­jec­t, spe­cial­ly be­cause I did it with the ab­surd con­straint of stay­ing be­low 128 lines of code.

And then I did not touch if for six years. But yes­ter­day I did.

commit 0b29b060ab9962a32e671551b0f035764cbeffaa
Author: Roberto Alsina <ralsina@medallia.com>
Date:   Tue Oct 30 12:32:43 2018 -0300

    Initial PySide2 port

commit 831c30d2c7e6b6b2a0a4d5d362ee7bc36493b975
Author: roberto.alsina@gmail.com <roberto.alsina@gmail.com@1bbba601-83ea-880f-26a2-52609c2bd284>
Date:   Fri Jun 1 15:24:46 2012 +0000

    nicer, smaller margins

Six years is a long time. So, nowa­days:

  • I pre­fer my code to be for­mat­ted bet­ter
  • Python 3 is the thing
  • Py­Side is of­fi­cial, so I would rec­om­mend us­ing it in­stead of PyQt
  • Qt is now on ver­sion 5 in­stead of 4

So, with those new con­straints in mind, I port­ed De­Vi­cen­zo to the lat­est ev­ery­thing, for­mat­ted the code prop­er­ly us­ing black, and ex­pand­ed by line lim­it to a gen­er­ous 256.

And Here it is ... it's not re­aly use­ful but it is an ex­am­ple of how ex­pres­sive the Python/Qt com­bi­na­tion can be, even while be­ing an ab­surd­ly bad ex­am­ple no­body should fol­low (O­h, the lamb­das!)

screenshot


Contents © 2000-2024 Roberto Alsina