Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Is nit possible to use painter.drawText with updating text

Is nit possible to use painter.drawText with updating text

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 176 Views 1 Watching
  • 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.
  • S Offline
    S Offline
    SymBAD
    wrote on last edited by
    #1

    Hello,

    I am trying to adapt .painter.drawText(0, 20, text); on my code and kindly would like to ask if it is possible adding the text I have defined on another function as signal.

    def paintEvent(self, event):
        painter = QtGui.QPainter(self)
        painter.drawImage(0, 0, self.image)
        if not self.drawROI:
            return
        width = self.image.width()
        height = self.image.height()
        painter.setPen(QtGui.QPen(QtCore.Qt.red, 2))
        painter.drawRect(30,30,40,40)
        painter.drawText(0, 20,  videoframe.textChanged);
        self.update()
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Are you trying to use a signal in your drawText call ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      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