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. getting Qpainter error while settext for qlineEdit(urgent)
Forum Updated to NodeBB v4.3 + New Features

getting Qpainter error while settext for qlineEdit(urgent)

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 441 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.
  • G Offline
    G Offline
    Gokul2002
    wrote on last edited by Gokul2002
    #1

    Hi all,

    I am getting the below error while I am using setText for QlineEdit
    (self.ui.Diode_ore.setText("Forward")) this is what I am using

    QPainter::begin: Paint device returned engine == 0, type: 3
    QPainter::setCompositionMode: Painter not active
    QPainter::end: Painter not active, aborted

    because of this in ui I can't able to see full forward. and i am using thread to update the QlineEdit.

    3d3aed0a-fe1a-4bb4-aa8d-8b1d2ec54be7-image.png

    This what i am getting in the box F is missing.

    Christian EhrlicherC 1 Reply Last reply
    0
    • G Gokul2002 marked this topic as a regular topic on
    • G Gokul2002

      Hi all,

      I am getting the below error while I am using setText for QlineEdit
      (self.ui.Diode_ore.setText("Forward")) this is what I am using

      QPainter::begin: Paint device returned engine == 0, type: 3
      QPainter::setCompositionMode: Painter not active
      QPainter::end: Painter not active, aborted

      because of this in ui I can't able to see full forward. and i am using thread to update the QlineEdit.

      3d3aed0a-fe1a-4bb4-aa8d-8b1d2ec54be7-image.png

      This what i am getting in the box F is missing.

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Gokul2002 said in getting Qpainter error while settext for qlineEdit(urgent):

      and i am using thread to update the QlineEdit.

      You must not modify any gui elements from outside the gui thread.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      G 1 Reply Last reply
      1
      • Christian EhrlicherC Christian Ehrlicher

        @Gokul2002 said in getting Qpainter error while settext for qlineEdit(urgent):

        and i am using thread to update the QlineEdit.

        You must not modify any gui elements from outside the gui thread.

        G Offline
        G Offline
        Gokul2002
        wrote on last edited by
        #3

        @Christian-Ehrlicher But i am updating same way with this self.ui.Diode_ore.setText("Reverse") just text is changed at this time it is coming as per text.

        Christian EhrlicherC 1 Reply Last reply
        0
        • G Gokul2002

          @Christian-Ehrlicher But i am updating same way with this self.ui.Diode_ore.setText("Reverse") just text is changed at this time it is coming as per text.

          Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Gokul2002 said in getting Qpainter error while settext for qlineEdit(urgent):

          But i am updating same

          What is not understandable with my comment? Modifing ui stuff from outside the main thread is not allowed. You told us you are doing this and getting errors so what else should we tell you?

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          0
          • G Offline
            G Offline
            Gokul2002
            wrote on last edited by
            #5

            @Christian-Ehrlicher ok bro then i will try to update outside the thread . If possible is there any other solution please let me know.

            Christian EhrlicherC 1 Reply Last reply
            0
            • G Gokul2002

              @Christian-Ehrlicher ok bro then i will try to update outside the thread . If possible is there any other solution please let me know.

              Christian EhrlicherC Offline
              Christian EhrlicherC Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Gokul2002 said in getting Qpainter error while settext for qlineEdit(urgent):

              If possible is there any other solution please let me know.

              https://doc.qt.io/qt-6/signalsandslots.html

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              1 Reply Last reply
              1

              • Login

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