Jan-05-2017, 04:27 PM
Hi,
I am a newbie to Python Gui Development ... and also new to this forum
At the moment I am writing a Python application with the help of the module PySide (so I was a bit astonished not to find [PySide] as a prefix for the thread subject. Whatever, I am sure it makes no difference to PyQt.
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!!!
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!!!