Results 1 to 2 of 2

Thread: QPointF == operator usage

  1. #1
    Join Date
    Feb 2009
    Posts
    189
    Thanks
    2

    Default QPointF == operator usage

    Dear Friends
    I have two QPointF points and I want to compare them if they're equal....How can I use the non-member operator and check whether they're equal.

    QPointF point1, point2;
    QPointF:perator==(&point1,&point2);

    is this correct ?

    I'll appreciate if someone could help me !

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QPointF == operator usage

    totally normal as you would with a natural type:
    if(point1 == point2){
    ...
    }

    READ THE DOCS!
    http://doc.trolltech.com/4.5/qpointf.html
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Replies: 6
    Last Post: 7th October 2008, 13:14
  2. QPointF equality operator
    By jenova_project in forum Newbie
    Replies: 1
    Last Post: 22nd September 2008, 17:42
  3. operator<<
    By mickey in forum General Programming
    Replies: 3
    Last Post: 10th June 2008, 01:50
  4. QPointF transformation
    By dreamer in forum Qt Programming
    Replies: 3
    Last Post: 13th May 2008, 11:11
  5. The -> Operator
    By keifer in forum Newbie
    Replies: 1
    Last Post: 11th March 2008, 03:24

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.