Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QMovie help
Forum Updated to NodeBB v4.3 + New Features

QMovie help

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 4.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    audrensitas
    wrote on last edited by
    #1

    Do someone know how to set location of QMovie object ? I added animated gif to this function and when i start my program it shows my animation on top left, but i tried with setGeometry and also setAlignment but it gave no results.

    Also, do someone know how to connect this QMovie animation with QPushButton, that i click my animated duck and it disappear or does something else??

    @void CFrameWnd::SukurtiAnti()
    {
    QMovie *movie = new QMovie(":/Antis/paveiksl/duck1111.gif");
    QLabel *processLabel = new QLabel(this);
    processLabel->setMovie(movie);
    //processLabel->setGeometry(10,5,55,39);
    //processLabel->setAlignment(Qt::AlignBottom);
    movie->start();

    QPushButton *button = new QPushButton(this);
    ui->toolBar->addWidget(button);
    button->setStyleSheet("background-image: url(:/Antis/paveiksl/duck1111.gif)");
    }@

    Here is screenshot of my duck position. http://img684.imageshack.us/i/screenshotafj.png/

    1 Reply Last reply
    0
    • frankcyblogic.deF Offline
      frankcyblogic.deF Offline
      frankcyblogic.de
      wrote on last edited by
      #2

      Has "this" a layout? Just my guess...

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andre
        wrote on last edited by
        #3

        This has nothing to do with QMovie. Just use a layout to manage the geometry of your widget. You can position the label any place you want it in the parent widget. It seems that you already are using Qt Designer and ui files. Why not add the QLabel you want to use for your movie there, put it in the layout you like, and simply reference the label instead of creating a new one in the code you are showing?

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved