Results 1 to 2 of 2

Thread: paint on rectangle using mouse area qml(Qt-5 ubuntu)

  1. #1
    Join Date
    May 2013
    Posts
    11
    Thanks
    1
    Thanked 4 Times in 4 Posts
    Platforms
    Unix/X11

    Default paint on rectangle using mouse area qml(Qt-5 ubuntu)

    To paint the rectangle in qml using mouse area. I dont know how to use drag to paint the rectangle. Here is the code i am working with

    Qt Code:
    1. Rectangle {
    2. id: container
    3. width: 600; height: 200
    4.  
    5.  
    6. MouseArea {
    7. anchors.fill: parent
    8. drag.target:
    9. drag.axis:
    10.  
    11. }
    12. }
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: paint on rectangle using mouse area qml(Qt-5 ubuntu)

    Use a Canvas element.
    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.


Similar Threads

  1. Replies: 5
    Last Post: 12th March 2013, 15:58
  2. glitchy QPixmap drawing on paint area
    By Lapsio in forum Qt Programming
    Replies: 1
    Last Post: 18th November 2012, 21:04
  3. Can QRubberBand paint out of clipping area ?
    By topoden in forum Qt Programming
    Replies: 2
    Last Post: 18th February 2010, 14:43
  4. PrimitiveElemet's Paint Area
    By derick in forum Qt Programming
    Replies: 1
    Last Post: 1st February 2006, 16:52
  5. How to paint a selection rectangle on a pixmap?
    By SkripT in forum Qt Programming
    Replies: 6
    Last Post: 8th January 2006, 20:52

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.