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. Symbian^3 and QPainter.rotate()
Qt 6.11 is out! See what's new in the release blog

Symbian^3 and QPainter.rotate()

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 4 Posters 4.3k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hi All

    I'm using Qt 4.7, and got a strange behaviour of QPainter.rotate function on Symbian^3 (Nokia N8, C7-00, etc). In my program I use QGraphicsView, QGraphicsScene and a subclass of QGraphicsPixmapItem, in which I define a QString field, and redefine the paint method as follows:
    @
    void Sticker::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) {
    QGraphicsPixmapItem::paint(painter, option, widget); // let Qt draw pixmap
    //Drawing black text rotated 15 degrees with bold Tahoma font:
    painter->rotate(15); // rotate 15 degrees
    painter->setFont(QFont("Tahoma", 6, 1, true)); // set font
    painter->setPen(QColor("black")); // set color
    painter->drawText(10, 10, 100, 100, Qt::TextWordWrap, aText); // and draw text
    }
    @

    On Symbian S50 (tested on Nokia 5800) I get a good rotated text painted withing specified rotated rectangle over my pixmap item. But on Symbian^3 I get a not rotated text started at point(0,0) withing a rotated rectangle. How to handle such obstacle?

    Thanks ahead

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      Hope that it gets fixed in the final release of Qt 4.7. Since the current release is in beta, you can also raise a bug for this case.

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        Could you test if it still happens if you launch your app with start parameter "-graphicssystem raster"
        (or set the graphics system with QApplication::setGraphicsSystem ( const QString & system ))?
        If it doesn't happen now, then the issue is with the openVg. Please report the finding to http://bugreports.qt.nokia.com.

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          The issue does point towards OpenVG (since that's the major difference with Qt on S^3), however opening a QPainter on a QPixmap will still use the raster paint engine so it should look the exact same as S60 5.0. It would be interesting to see if this happens even without QGraphicsView.

          In any case, this sounds like a bug that needs investigating so please submit a report with a minimal test case.

          1 Reply Last reply
          0
          • ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #5

            I had submitted this on bug-tracker.

            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