Results 1 to 19 of 19

Thread: How to speed up a transparent QGraphicsTextItem in Opengl?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to speed up a transparent QGraphicsTextItem in Opengl?

    And what is the boundingRect() of the item?

    Edit: I'm not able to reproduce the behaviour you observe using the following code. Can you change it so that it reproduces your problem?

    Qt Code:
    1. #include <QtGui>
    2. #include <QGLWidget>
    3.  
    4. int main(int argc, char **argv){
    5. QApplication app(argc, argv);
    6. scene.setBackgroundBrush(Qt::blue);
    7. view.setScene(&scene);
    8. view.setViewport(new QGLWidget);
    9. QString txt = "Some text";
    10. QGraphicsTextItem *item = scene.addText(txt);
    11. QFont f;
    12. f.setPointSize(36);
    13. item->setFont(f);
    14. item->setFlag(QGraphicsItem::ItemIsMovable);
    15. item->setCacheMode(QGraphicsItem::ItemCoordinateCache);
    16. QTransform trans;
    17. trans.rotate(60, Qt::YAxis);
    18. item->setTransform(trans);
    19. item->setOpacity(0.7);
    20. view.show();
    21. return app.exec();
    22. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by wysota; 27th October 2009 at 23:41.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. The following user says thank you to wysota for this useful post:

    JohannesMunk (28th October 2009)

Similar Threads

  1. OpenGL and Qt Question
    By ToddAtWSU in forum Qt Programming
    Replies: 2
    Last Post: 18th April 2009, 18:04
  2. Does OpenGL speed up the loading image?
    By learning_qt in forum Qt Programming
    Replies: 2
    Last Post: 4th December 2008, 09:26
  3. QMatrix rotate on QGraphicsTextItem speed on render..
    By patrik08 in forum Qt Programming
    Replies: 2
    Last Post: 22nd December 2007, 19:46
  4. OpenGL app at full speed? Can you do it?
    By mattropolis in forum Qt Programming
    Replies: 1
    Last Post: 18th October 2007, 10:54
  5. Qtopia Core & OpenGL ES?
    By zelko in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 28th May 2007, 07:21

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.