Hplip problems error: Unable to load Qt4 support. Is it installed?

As long as I have used our HP Laserjet P1102w printer, the software has been a pain to use. Installing the printer has to be done regularly because with every update the driver seems to disappear. So I stopped using the printer from Manjaro for a while, but now I want to start using it again. But now hplip does not seem to work. Hp-setup starts alright, but after selecting to connect the printer on USB it silently disappears. Starting from the commandline I get more info:

HP Linux Imaging and Printing System (ver. 3.21.12)
Printer/Fax Setup Utility ver. 9.0

Copyright (c) 2001-18 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Searching... (bus=usb, search=(None), desc=0)
error: Unable to load Qt4 support. Is it installed?
Traceback (most recent call last):
  File "/usr/share/hplip/ui5/setupdialog.py", line 1340, in NextButton_clicked
    self.showDevicesPage()
  File "/usr/share/hplip/ui5/setupdialog.py", line 562, in showDevicesPage
    smart_install.disable(GUI_MODE, 'qt4')
  File "/usr/share/hplip/base/smart_install.py", line 236, in disable
    dialog.exec_()
AttributeError: 'NoneType' object has no attribute 'exec_'
zsh: abort (core dumped)  hp-setup

So a few questions:

  1. how do I install this printer (or how do install QT4 support? (PyQt4 does not even seem to install with pip)
  2. Why does it ask for QT4 which is really old I think?

So I think I found a solution.

  • I removed hplip with pamac remove hplip.
  • Then I fully cleaned the pamac cache with pamac clean --keep 0.
  • Then installed hplip again with pamac install hplip. Now I don’t seem to get that error searching for QT4 again.

It’s not neat and tidy, bit dangerous with deleting the full cache, but it seems to have done the job.