Maybe the file was corrupt or something(?)
The possible scenario is you've set the custom data directory using the GUI's welcome screen that was saved in that qt config file.
In that case, Bitcoin-qt had been using the "
bitcoin.conf" saved in that custom data directory instead of the one at ~/.bitcoin.
The reason why it's not adhering to the maxconnections setting that you've been using in bitcoind.
I decided to delete the current bitcoin-qt.conf file and restarted bitcoin-qt. It regenerated that bitcoin-qt.conf file and then somehow magically now it is adhering to the original maxconnections setting.
Continuing from the above, after deleting the file, you've essentially deleted the custom datadir set by the GUI and made Bitcoin-qt use the "
bitcoin.conf" at ~/.bitcoin.
That worked seamlessly because you must have set the same custom directory in that bitcoin.conf file.