Results 1 to 1 of 1

Thread: Anchoring and Dragging

  1. #1
    Join Date
    Dec 2010
    Thanked 2 Times in 2 Posts
    Qt products

    Default Re: Anchoring and Dragging

    I'm making my first steps with QML. No newbie forum for Qt Quick as it's so fresh :-) So I'll just ask here.

    I have an Image I want to center in its parent but also to allow dragging it using a MouseArea. Naturally I'd use the "anchors.centerIn: parent" to get the image in the position I want, but then my drag doesn't work. Is there a way to define a starting position as easily as with the anchor but still allow dragging?

    Added after 33 minutes:

    May have found the solution in another thread here, saying I should set the anchors to undefined on the pressed signal.
    Based on

    Will try.
    Last edited by frankiefrank; 20th September 2011 at 10:48.

Similar Threads

  1. built in dragging
    By idoroth in forum Newbie
    Replies: 5
    Last Post: 21st September 2011, 10:37
  2. Left-to-right gradient with proper anchoring
    By Asperamanca in forum Qt Quick
    Replies: 2
    Last Post: 9th November 2010, 08:10
  3. Widget dragging in MDI app
    By zeeeend in forum Qt Programming
    Replies: 3
    Last Post: 17th January 2007, 22:11
  4. dragging
    By mickey in forum Newbie
    Replies: 1
    Last Post: 25th July 2006, 15:05
  5. dragging
    By mickey in forum Newbie
    Replies: 5
    Last Post: 11th March 2006, 01:26

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.