Results 1 to 2 of 2

Thread: QLabel to QgraphicsView

  1. #1
    Join Date
    Jun 2013
    Qt products
    Qt4 Qt5 Qt/Embedded

    Question QLabel to QgraphicsView

    I subclassed Qlabel
    Painted image in label
    User can create points, lines, etc in label (on image)

    How do I save the image with the painted points/lines/etc in a variable (QImage, maybe)
    & then Load the new edited version of the image into graphicsview

    The user should not be aware of the change

    Since the label is promoted (subclassed QLabel)
    there are a alot of functionality i redefined so i do not want to reimplement all the functions
    in graphics view... thats why only once the editing is completed do i want to load it into graphics view
    (unless there is an easy way to move functions from QLabel to QGraphicsView, then i'll do everything in GraphicsView)

    Direction on how to go about it...
    #Saving image
    #Clearing label
    #Setting graphics view

    Kind Regards

  2. #2
    Join Date
    Feb 2011
    Thanked 28 Times in 27 Posts
    Qt products
    Unix/X11 Windows

    Default Re: QLabel to QgraphicsView

    Create a wrapper around your widget with QGraphicsProxyWidget

Similar Threads

  1. QT Drag and Drop a QLabel into a QGraphicsView, how to?
    By jiapei100 in forum Qt Programming
    Replies: 5
    Last Post: 6th March 2013, 10:16
  2. Replies: 7
    Last Post: 1st December 2011, 16:24
  3. Replies: 1
    Last Post: 29th September 2009, 19:44
  4. Replies: 1
    Last Post: 2nd August 2008, 15:46
  5. Simulating Video on QLabel or QGraphicsView
    By forrestfsu in forum Qt Programming
    Replies: 9
    Last Post: 21st March 2007, 10:39

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.