E
E
EmeraldGuy2021-06-24 13:14:04
PyQt
EmeraldGuy, 2021-06-24 13:14:04

PyQt5 Small buttons. How to fix?

60d45a5f7d3ce388512415.png

Made a calculator interface in Qt Designer. I converted it to Python with the command:
pyuic5 -x calc.ui -o main.py

Why are the buttons in Python so small and how to fix it?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
H
HemulGM, 2021-06-24
@HemulGM

resize window

J
Jacob E, 2021-06-24
@Zifix

def main_gui(args: argparse.Namespace):
    QApplication.setAttribute(Qt.AA_EnableHighDpiScaling)

I
idkiberlord077, 2022-01-04
@idkiberlord077

if __name__ == "__main__":    
//перед созданием обьекта класа QApplication
QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling, True)

//потом уже обьект

app = QtWidgets.QApplication(sys.argv)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question