Results 1 to 3 of 3

Thread: Asap!!!! Qt duck shoot

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Asap!!!! Qt duck shoot

    Hello.

    I am trying to create a duck hunt game via QT creator.

    So i need some help.

    I have user interface (background some picture) and now i need to create object ( animated GIF duck flying) <- i dunno how to do this , then to make it show on user interface ( background ) <- also this | and the most important thing i have to make that object move via X axis. ( from 0 to 700 ) and the most important part is that, that i have to make the movement visible -> i want to see moving object via X axis. Also the duck must appear somewhere in Y axis ( from 0 to 100 ) it has to be random appearing and hard thing that the more time pass, the more ducks have to appear in different places on Y axis ant move via X axis.
    Any help is appreciated . Very many thanks. Reply someone as soon as possible.
    I have tried with this. This means to create duck object.
    Qt Code:
    1. void CFrameWnd::SukurtiAnti()
    2. {
    3. // QMovie *movie = new QMovie(":/Antis/paveiksl/duck.gif");
    4. // QLabel *processLabel = new QLabel(this);
    5. // processLabel->setMovie(movie);
    6. // movie->start();
    7. QWidget *antis = new QWidget(this);
    8. // antis->setStyleSheet("background-image: url(:/Antis/paveiksl/duck.gif)");
    9. ui->gridLayout->addWidget(antis);
    10. QPushButton *button = new QPushButton("one");
    11. ui->gridLayout->addWidget(button);
    12. button->setGeometry(20,20,20,20);
    13. button->setStyleSheet("background-image: url(:/Antis/paveiksl/duck.gif)");
    14. antis->show();
    15. }
    To copy to clipboard, switch view to plain text mode 
    First of all i try to create new widget antis then new layout is created to make duck visible on background ( but there isn't and i don't know why) . i tried to make animated gif with movie, but the picture is not shown ... i also tried to create pushbutton but there is no results at all.. So help me with any replies.
    Regards Audrius
    Last edited by high_flyer; 27th April 2011 at 08:14. Reason: code tags

Similar Threads

  1. Replies: 1
    Last Post: 20th January 2014, 03:02
  2. Please help ASAP::QColorDialog
    By LiCodeX in forum Newbie
    Replies: 2
    Last Post: 2nd October 2007, 12:16

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.