Python Forum
[PyQt] Selecting lines in a list
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyQt] Selecting lines in a list
#1
Hi,

I am a newbie to Python Gui Development ... and also new to this forum Smile   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!!!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] list box select event triggers when selecting another listbox Roshan 1 4,263 May-09-2021, 08:27 AM
Last Post: Yoriz

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020