I am writing a robotics program in C++, using Qt for the GUI, where each thread needs access to hardware. The library which accesses the hardware is called pigpio, and it modifies /dev/mem, so it needs root access.
The problem is that the user does not have root access, plus they are interfacing with the GUI and they shouldn't be bothered with having to put in a password anyway. I tried to setuid, but Qt does not support it, and neither does GTK+. How can the user run the GUI as root without password? The system is Ubuntu 18.04 on Raspberry Pi 3B+.