![]() |
[PyQt] Selecting lines in a list - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: GUI (https://python-forum.io/forum-10.html) +--- Thread: [PyQt] Selecting lines in a list (/thread-1465.html) |
Selecting lines in a list - BigMan - Jan-05-2017 Hi, I am a newbie to Python Gui Development ... and also new to this forum ![]() In the current version of my little Python application I want to realize a music-playlist. In my current approach, the Python application reads a text-file line by line and appends those lines to a PySide-Widget QtGui.QTextBrowser(). Each line contains the path to e music-file. This works already very well. In a next step, I want to be able to click on a certain line within the QtTextBrowser()-Widget and to get the content of that line stored in a string-variable. I have checked the document from PySide regarding QtTextBrower put wasn't able to find a solution for my problem (to click on a certain line, and to get back the content of that line). I also checked QTextEdit() but I don't want that the list can be modified. Perhaps somebody know, which Widget to choose and give me a hint which method to use. Thanks!!! |