Results 1 to 3 of 3

Thread: Getting bottom, top, left, right properties of an item (e.g. a rect) as double

  1. #1
    Join Date
    Jul 2011
    Posts
    22
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Getting bottom, top, left, right properties of an item (e.g. a rect) as double

    I tried to output the values of a

    Rectangle {
    id='myrect'
    ...
    }

    with myrect.top myrect.left

    and it doesn't return a double or real value that i can use in calculations

    it writes only QVariant(QDeclarativeAnchorLine)

    i need to calculate and do some control, is it possible or qml does not allow us to do such calculations?

  2. #2
    Join Date
    Apr 2011
    Posts
    36
    Thanks
    3
    Thanked 3 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Getting bottom, top, left, right properties of an item (e.g. a rect) as double

    calculations means which type of calculations?

    rect.x and rect.y gives where to start the rect.
    width and height gives dimensions of rect.

  3. #3
    Join Date
    Jul 2011
    Posts
    22
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Getting bottom, top, left, right properties of an item (e.g. a rect) as double

    i do not only want where the rect starts,
    i want top most, left most, right most, bottom most coordinats.

    also not always a rectangle, usually a polygon which can be drawn using Box2D.
    I think i want more than qml can do :S

Similar Threads

  1. Replies: 1
    Last Post: 9th February 2011, 23:06
  2. Replies: 1
    Last Post: 25th May 2010, 14:44
  3. QGroupBox without bottom - left - right lines
    By SeNSe in forum Qt Programming
    Replies: 2
    Last Post: 28th April 2010, 13:51
  4. Qcombobox item rect?
    By shud in forum Qt Programming
    Replies: 0
    Last Post: 22nd November 2009, 12:07
  5. Replies: 7
    Last Post: 15th November 2007, 17:19

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.