Results 1 to 4 of 4

Thread: Little issue when trying to use a value as a function

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,540
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Little issue when trying to use a value as a function

    Line 63 :
    Qt Code:
    1. painter.rotate(12.0 * ((velocity(0))));
    To copy to clipboard, switch view to plain text mode 
    what do You want to do ???

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Little issue when trying to use a value as a function

    The needle on the dial should be rotated by some amount proportional to the velocity before being drawn. Commented line 30 with its float velocity looks like a better, though not correct, fit to line 63. The constant 12.0 is coming from the 12-hour clock this was cut-n-pasted from.

  3. #3
    Join Date
    Mar 2011
    Location
    Narvik, Norway
    Posts
    13
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Little issue when trying to use a value as a function

    Hi,
    I think I am giving upp on that project since it might be that the vehicle goes a bit to fast for a 360 degrees visualization, but now I want to make this code to be a roll meter instead, to see if the vehicle is horizontal or in a roll, if you know what I mean, like in flightsimulator =) (----) or (not horizontal line).

Similar Threads

  1. Replies: 7
    Last Post: 9th December 2010, 22:26
  2. Replies: 2
    Last Post: 13th September 2010, 20:03
  3. Replies: 3
    Last Post: 25th May 2010, 09:46
  4. Replies: 0
    Last Post: 10th March 2010, 08:13
  5. Zip function for Qt4
    By devilj in forum Newbie
    Replies: 7
    Last Post: 15th July 2007, 14:37

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.