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. QPainter::begin:: A paint device can only be painted by one painter at a time
Forum Updated to NodeBB v4.3 + New Features

QPainter::begin:: A paint device can only be painted by one painter at a time

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 3.0k 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.
  • W Offline
    W Offline
    wone
    wrote on last edited by
    #1

    11.PNG

    Hello. I am a very very beginner.
    There is a very big problem with using Qpainter. I keep getting the following error in my project.
    "QPainter::begin:: A paint device can only be painted by one painter at a time"
    So I tried running another project that was running fine on another computer to try it out, but still got the same error at that perfect project. So I created a new widget project and executed it without adding anything other than the above sentence, but I still get the same error. Obviously, Qpainter was used only in one place, but why does this error occur?
    I think there are other problems in my environment because I see the same error even on a project that runs well on another computer, but I don't know what it is....
    Please save me ,,,,,,,,,,,,,,

    B JonBJ 2 Replies Last reply
    0
    • W wone

      11.PNG

      Hello. I am a very very beginner.
      There is a very big problem with using Qpainter. I keep getting the following error in my project.
      "QPainter::begin:: A paint device can only be painted by one painter at a time"
      So I tried running another project that was running fine on another computer to try it out, but still got the same error at that perfect project. So I created a new widget project and executed it without adding anything other than the above sentence, but I still get the same error. Obviously, Qpainter was used only in one place, but why does this error occur?
      I think there are other problems in my environment because I see the same error even on a project that runs well on another computer, but I don't know what it is....
      Please save me ,,,,,,,,,,,,,,

      B Offline
      B Offline
      Bonnie
      wrote on last edited by Bonnie
      #2

      As I can see, the QImage has not be created, it is a wild pointer.
      It surprises me that you didn't get a crash.

      1 Reply Last reply
      3
      • W wone

        11.PNG

        Hello. I am a very very beginner.
        There is a very big problem with using Qpainter. I keep getting the following error in my project.
        "QPainter::begin:: A paint device can only be painted by one painter at a time"
        So I tried running another project that was running fine on another computer to try it out, but still got the same error at that perfect project. So I created a new widget project and executed it without adding anything other than the above sentence, but I still get the same error. Obviously, Qpainter was used only in one place, but why does this error occur?
        I think there are other problems in my environment because I see the same error even on a project that runs well on another computer, but I don't know what it is....
        Please save me ,,,,,,,,,,,,,,

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

        @wone
        Not only is @Bonnie correct, I can also see a yellow warning triangle against your painter.begin(img) line. What does that warning tell you?

        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