Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Displaying text with glow effect using paint method in QStyledItemDelegate derived class
Forum Updated to NodeBB v4.3 + New Features

Displaying text with glow effect using paint method in QStyledItemDelegate derived class

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 185 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    Qazi
    wrote on last edited by
    #1

    Hi, I am using QistView to display simple text list. I have a custom delegate class deriving from QStyledItemDelegate and I am using its paint method to draw the text using painter.drawText(args). Now I would like to make the text glow as soon as the user presses the QListView item and make the text glow disappear when the user releases/ or start scrolling the QListView.
    Previously I implemented this feature using QListwidget where I was adding custom QWidgets to populate the list. I had a QWidgets derived class for each item where I added QLabels and I was using QGraphicsDropShadowEffect to achieve this glow effect. However, this approach was not efficient as at the end the QListwidget became laggy and I was not able to scroll properly. Hence I moved to QListView with custom delegate approach.

    Please guide me to achieve this behaviour.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved