M
M
michadimin2021-07-16 18:37:56
PyQt
michadimin, 2021-07-16 18:37:56

How to add text to QScrollArea while the program is running?

I want to create a simple calculator that can only add 2 numbers and save the calculation history in a small widget on the right. The problem is that I did not find how it would be possible to add the result of the calculation and the example itself there immediately, as soon as the user clicks on the calculation button.

I do all this with QtDesigner WITHOUT converting the .ui file to a .py file, but by changing the properties of objects according to the pattern "win.object_name.function" (or something like that).

Here is the code - https://pastebin.com/Xwbtzz4M
Here is the ".ui" file - https://disk.yandex.ru/d/72oYSum_DaLB1g

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
bbkmzzzz, 2021-07-16
@bbkmzzzz

Add a layout to the widget that will be added to the QScrollArea and feed it new widgets.
QTDesigner will not help much, it will only allow you to draw molds, everything else is in the code.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question