Results 1 to 2 of 2

Thread: Object Member Question

  1. #1
    Join Date
    Jun 2011
    Posts
    203
    Thanks
    7
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Object Member Question

    Hi, I have an expression:

    Qt Code:
    1. if(iXCoordinate < ClassObject.ClassMemberObject.Xposition)
    2. {
    3. //do something
    4. }
    To copy to clipboard, switch view to plain text mode 

    However I get an error: "Expected primary -expression before '.' token". Not sure why.

    Xposition is a double and so is iXCoordinate.

  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: Object Member Question

    Most probably your "ClassObject" is an invalid expression.
    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. Cannot call member function without object
    By ehntun in forum Qt Programming
    Replies: 0
    Last Post: 24th October 2012, 07:09
  2. Replies: 2
    Last Post: 18th August 2012, 06:49
  3. cannot call member function without object
    By been_1990 in forum Qt Programming
    Replies: 11
    Last Post: 23rd October 2010, 17:12
  4. New member and a question about QListWidget
    By Pokepasa in forum Qt Programming
    Replies: 2
    Last Post: 4th November 2009, 10:24
  5. Replies: 2
    Last Post: 7th July 2009, 17:44

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.