Giter VIP home page Giter VIP logo

maya2016-qt4's People

Contributors

mottosso avatar zclongpop123 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

maya2016-qt4's Issues

animation cannot work without a error wrong code

I try to make a image repeater ,so i choose animation of QPropertyAnimation as method.
the image will display for 3s
and then clear for 1s , and then display next one.

normal animation code is:


    def imgstart(self,i):
        self.loadimg()
        #i=-1 can clear image in label
        if i== -1:
            self.ui.imgShow_label.clear()
        else:
            animation =QPropertyAnimation(self.ui.imgShow_label,"pos")
            animation.setDuration(500)
            animation.setStartValue(QPoint(360, 50))
            animation.setEndValue(QPoint(10,50))
            animation.setEasingCurve(QEasingCurve.InOutCubic)
            #display image
            self.ui.imgShow_label.setPixmap(self.pixmap[i])
            #image canimation
            animation.start()

By common sense ,this code shoud work successfully.but ,it can't.
i add a wrong code follow the code by accident:

for i in 1:
                pass

The animation moves!!!
the wrong code made this animation moves!!also print error message:

Traceback (most recent call last):
  File "error_code_rate.py", line 191, in imgstart
    for i in 1:
TypeError: 'int' object is not iterable

This is a strange bug

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.