Results 1 to 20 of 35

Thread: How to threading data in app?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2013
    Location
    VietNam
    Posts
    41
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Windows Android
    Thanks
    3

    Default Re: How to threading data in app?

    Quote Originally Posted by wysota View Post
    The object knows its own color, ask the object for its "color" property instead of asking the screen for a pixel color.
    I only used object get position to get pixel in screen. The object have "color" property is "transparent.
    As this video below

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: How to threading data in app?

    How is the gradient implemented?
    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.


  3. #3
    Join Date
    Oct 2013
    Location
    VietNam
    Posts
    41
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Windows Android
    Thanks
    3

    Default Re: How to threading data in app?

    Quote Originally Posted by wysota View Post
    How is the gradient implemented?
    Qt Code:
    1. gradient: Gradient {
    2. id: id0
    3. GradientStop {
    4. position: 0.0
    5. id: id1
    6. SequentialAnimation on color {
    7. id: update1
    8. loops: Animation.Infinite
    9. ColorAnimation { from: "red"; to: "magenta"; duration: 1000}
    10. ColorAnimation { from: "magenta"; to: "blue"; duration: 1000}
    11. ColorAnimation { from: "blue"; to: "cyan"; duration: 1000}
    12. ColorAnimation { from: "cyan"; to: "lime"; duration: 1000}
    13. ColorAnimation { from: "lime"; to: "yellow"; duration: 1000}
    14. ColorAnimation { from: "yellow"; to: "red"; duration: 1000}
    15. }
    16. }
    17. GradientStop {
    18. position: 1
    19. id: id2
    20. SequentialAnimation on color {
    21. id: update2
    22. loops: Animation.Infinite
    23. ColorAnimation { from: "yellow"; to: "red"; duration: 1000}
    24. ColorAnimation { from: "red"; to: "magenta"; duration: 1000}
    25. ColorAnimation { from: "magenta"; to: "blue"; duration: 1000}
    26. ColorAnimation { from: "blue"; to: "cyan"; duration: 1000}
    27. ColorAnimation { from: "cyan"; to: "lime"; duration: 1000}
    28. ColorAnimation { from: "lime"; to: "yellow"; duration: 1000}
    29. }
    30.  
    31. }
    To copy to clipboard, switch view to plain text mode 
    This is one example. I have get color pixel of screen another effect.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: How to threading data in app?

    It seems quite easy to calculate the color from such definition. You know the starting color, the ending color and the percentage of the gradient you are currently in.
    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. Threading with rsh and rcp
    By jaxrpc in forum Newbie
    Replies: 2
    Last Post: 4th June 2010, 12:50
  2. Threading...?
    By sekatsim in forum Qt Programming
    Replies: 12
    Last Post: 10th June 2008, 02:14
  3. Qt Threading
    By avh in forum Newbie
    Replies: 7
    Last Post: 30th May 2008, 21:20
  4. I'm failing with Threading
    By thomaspu in forum Qt Programming
    Replies: 2
    Last Post: 11th January 2008, 20:40
  5. Sub-Threading
    By TheGrimace in forum Qt Programming
    Replies: 4
    Last Post: 7th June 2007, 17:38

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.