pythonguis / feedback

Corrections & suggestions for Python GUIs tutorials on pythonguis.com
1 stars 0 forks source link

A Slight coding error #13

Open Grenny1 opened 5 months ago

Grenny1 commented 5 months ago

Hi Martin On this page:

https://www.pythonguis.com/faq/built-in-qicons-pyqt/

The line in the PyQt5 code:

layout.addWidget(btn, n / 4, n % 4)

Throws up a float error.

I think the line should be:

layout.addWidget(btn, int(n / 4), int(n % 4))

Thanks for all the examples. They've helped me a lot.