Results 1 to 6 of 6

Thread: QML extension - painting issue

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    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: QML extension - painting issue

    Quote Originally Posted by kornicameister View Post
    - draw the rectangle with text and icon inside of it
    Create a Rectangle Element with two children -- one for the icon and one for the text and anchor them to the parent.

    - how to put all these rectangles on the circle.
    That's quite simple. Write javascript code that will calculate x and y positions for different angles of the circle. Then instantiate your rectangles dynamically and place them in the calculated coordinates.The math involves calculating position of a point on a sloped line with distance equal to the radius of the circle (there is a right triangle there so it boils down to using sine or cosine).
    Last edited by wysota; 3rd October 2011 at 09:20.
    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:

    kornicameister (5th October 2011)

Similar Threads

  1. QMake Target extension
    By gregg in forum Qt Tools
    Replies: 2
    Last Post: 28th February 2011, 18:18
  2. QScrollArea and Painting issue
    By myfifth in forum Newbie
    Replies: 4
    Last Post: 21st January 2011, 08:21
  3. using qmotif extension
    By pascasio in forum Newbie
    Replies: 7
    Last Post: 30th November 2010, 13:53
  4. Using Qt with kernel extension dll
    By ramazangirgin in forum Qt Programming
    Replies: 1
    Last Post: 21st January 2008, 13:23
  5. QListWidget painting issue
    By guilugi in forum Qt Programming
    Replies: 6
    Last Post: 16th April 2007, 17:06

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.