Results 1 to 4 of 4

Thread: QGraphicsTextItem bug on mouse interaction?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default QGraphicsTextItem bug on mouse interaction?

    I found a fairly big bug with QGraphicsTextItem. Maybe someone can reproduce before I submit a bug report? Also where do I report bugs again?

    Qt Code:
    1. #include <QApplication>
    2. #include <QGraphicsRectItem>
    3. #include <QGraphicsTextItem>
    4. #include <QGraphicsScene>
    5. #include <QGraphicsView>
    6.  
    7. int main(int argc, char *argv[])
    8. {
    9. QApplication a(argc, argv);
    10.  
    11. QGraphicsRectItem* rect = new QGraphicsRectItem(QRectF(25,25,120,80),0,&scene);
    12. rect->setFlag(QGraphicsItem::ItemIsMovable, true);
    13. rect->setFlag(QGraphicsItem::ItemIsSelectable, true);
    14. rect->acceptHoverEvents();
    15.  
    16. QGraphicsTextItem* text = new QGraphicsTextItem("ABCDEFGHIJKLMNOP",rect,&scene);
    17. text->setTextInteractionFlags( Qt::TextEditorInteraction );
    18.  
    19. view.setScene( &scene );
    20. view.setDragMode( QGraphicsView::RubberBandDrag );
    21. view.show();
    22.  
    23. return a.exec();
    24. }
    To copy to clipboard, switch view to plain text mode 

    Run, select some text, now click on the dotted border of the edit text item.

    Mouse interaction stops working.

    I tried subclassing it and tried a few things with onmousepress events and such but wasn't able to fix this sucker.

    Can someone else confirm this? And possibly a workaround!?!
    Last edited by mooreaa; 3rd July 2008 at 13:47.

Similar Threads

  1. mouse moving don't produce mouse events
    By coralbird in forum Qt Programming
    Replies: 1
    Last Post: 13th September 2006, 06:13
  2. Replies: 2
    Last Post: 24th July 2006, 18:36
  3. QStackerWidget and mouse events
    By high_flyer in forum Qt Programming
    Replies: 3
    Last Post: 25th April 2006, 19:25

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.