Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Change color of text (a word) in qlinedit PYQT5
Forum Updated to NodeBB v4.3 + New Features

Change color of text (a word) in qlinedit PYQT5

Scheduled Pinned Locked Moved Unsolved Qt for Python
2 Posts 2 Posters 845 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.
  • A Offline
    A Offline
    aadil50
    wrote on last edited by
    #1

    I have situation where I want to detect for specific words (we have file) in user entered text in qlinedit, so i want to highlight that text.. So for highlighting i want to change color of that specific color found in qlinedit text... Is it possible? If yes then how can i achieve it in pyqt5...

    JonBJ 1 Reply Last reply
    0
    • A aadil50

      I have situation where I want to detect for specific words (we have file) in user entered text in qlinedit, so i want to highlight that text.. So for highlighting i want to change color of that specific color found in qlinedit text... Is it possible? If yes then how can i achieve it in pyqt5...

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @aadil50
      There are several ways to do this. This forum has How to change color only in selected letters in QLineEdit?

      Not sure whether you really need a QTextEdit rather than a QLineEdit.

      Think ahead to what you want to achieve here. Do you want to look at a QSyntaxHighlighter?

      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