D
D
danis_20142017-02-13 01:31:05
Python
danis_2014, 2017-02-13 01:31:05

How to create clickable text in PyQt5?

You need to make something like a dictionary. Something like this code:

box = QVBoxLayout()

for word in words:
    box.addWidget(QPushButton(word))

But firstly, the buttons are too large, and secondly, the text is in the middle (and preferably aligned to the left).
How to achieve what you want?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2017-02-13
@danis_2014

You can add custom styles to buttons

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question