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. Antialiasing works on simulator, not on N9
Forum Updated to NodeBB v4.3 + New Features

Antialiasing works on simulator, not on N9

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 2 Posters 2.7k 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.
  • A Offline
    A Offline
    alexisnot
    wrote on last edited by
    #1

    I am developing an app with Qt Creator for Nokia N9. Cause I need to draw things, I use class inherited from QWidget and on paintEvent I use QPainter to draw a line (drawLine(0,0,480,854))

    It works, but line is aliased on my device, and antialiased on simulator.

    I seems, that setRenderHints does not work at all and have no effect.

    @painter.setRenderHint(RenderHint.Antialiasing, true);@
    The text is aliased (drawText), but line is not. If I do:

    @painter.setRenderHint(RenderHint.TextAntialiasing, false);@
    Text is still aliased on N9 and not aliased in simulator. I'm stuck.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kkrzewniak
      wrote on last edited by
      #2

      AFAIK the N9 UI is running using OpenGL. Try using QPainter::HighQualityAntialiasing.

      Me, Grimlock, not "nice dino". ME BASH BRAINS!

      1 Reply Last reply
      0
      • A Offline
        A Offline
        alexisnot
        wrote on last edited by
        #3

        Ok, will try tonight and post the result! Thanks for participation!

        1 Reply Last reply
        0
        • A Offline
          A Offline
          alexisnot
          wrote on last edited by
          #4

          Checked -- doesn't work :-(

          The app is really simple.

          @
          Q_DECL_EXPORT int main(int argc, char argv[])
          {
          QApplication
          app = createApplication(argc, argv);
          Board* board = new Board();
          board->showFullScreen();
          app->installEventFilter(Board::instance);
          return app->exec();
          }

          void Board::paintEvent(QPaintEvent *)
          {
          QPainter painter(this);
          QPen pen;
          painter.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform | QPainter::HighQualityAntialiasing);
          pen.setWidth(3);
          painter.setPen(pen);
          painter.drawEllipse(.....);
          }
          @

          I so much need help!

          1 Reply Last reply
          0
          • A Offline
            A Offline
            alexisnot
            wrote on last edited by
            #5

            and Board is just QWidget

            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