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. QPainter errors while project compiling as static method
Forum Updated to NodeBB v4.3 + New Features

QPainter errors while project compiling as static method

Scheduled Pinned Locked Moved Mobile and Embedded
1 Posts 1 Posters 569 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
    Swinetha
    wrote on last edited by
    #1

    Hai,

    In my project I am used to display one image in my application so for that I am used Qpainter method to display image.
    This project is cross compiled for ARM controller. If I use dynamic compilation method image was displaying well.

    but if I use static compilation I am getting an error as shown below

    bq. QPainter::begin: Paint device returned engine == 0, type: 2
    QPainter::setWorldTransform: Painter not active
    QPainter::end: Painter not active, aborted

    and below is my code

    @
    QPixmap sourceImage("/Images/compassneedle.png");
    QPixmap rotatePixmap(sourceImage.size());
    rotatePixmap.fill(Qt::transparent);
    QTransform transform;
    transform.translate(sourceImage.size().width() / 2, sourceImage.size().height() / 2);
    transform.rotate(i);
    transform.translate(-sourceImage.size().width() / 2, -sourceImage.size().height() / 2);
    QPainter m_Qpointer;
    m_Qpointer.begin(&rotatePixmap);
    m_Qpointer.setTransform(transform);
    m_Qpointer.drawPixmap(0, 0, sourceImage);
    m_Qpointer.end();
    ContentImageLable->setScaledContents(true);
    myLabel->setScaledContents(true);

    myLabel->setPixmap(rotatePixmap);
    

    @

    please how can I solve this one. please suggest me
    is there any mistake is my code or static compilation is problem

    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