本文整理汇总了C++中QMovie::setSpeed方法的典型用法代码示例。如果您正苦于以下问题:C++ QMovie::setSpeed方法的具体用法?C++ QMovie::setSpeed怎么用?C++ QMovie::setSpeed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QMovie
的用法示例。
在下文中一共展示了QMovie::setSpeed方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QLabel
MyLogo::MyLogo(QWidget *parent)
:QLabel(parent)
{
QLabel *label_logo = new QLabel(parent);
filename = QString::fromUtf8("./system_picture/logo.gif");
QMovie *mygif = new QMovie(filename);
label_logo->setGeometry(660, 30, 60, 50);
mygif->setScaledSize(QSize(60, 50));
label_logo->setMovie(mygif);
mygif->setSpeed(50);
mygif->start();
}
示例2: QDialog
BusyDialog::BusyDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::BusyDialog)
{
ui->setupUi(this);
setWindowFlags(Qt::Popup);
QMovie *movie = new QMovie(":/loading.gif");
movie->setParent(this);
movie->setSpeed(50);// 50%
movie->setScaledSize(QSize(64, 64));
ui->labelGif->setMovie(movie);
}
示例3: animationLoading
QLabel* TabbedWebView::animationLoading(int index, bool addMovie)
{
if (index == -1) {
return 0;
}
QLabel* loadingAnimation = qobject_cast<QLabel*>(m_tabWidget->getTabBar()->tabButton(index, QTabBar::LeftSide));
if (!loadingAnimation) {
loadingAnimation = new QLabel();
}
if (addMovie && !loadingAnimation->movie()) {
QMovie* movie = new QMovie(":icons/other/progress.gif", QByteArray(), loadingAnimation);
movie->setSpeed(70);
loadingAnimation->setMovie(movie);
movie->start();
}
else if (loadingAnimation->movie()) {
loadingAnimation->movie()->stop();
}
m_tabWidget->getTabBar()->setTabButton(index, QTabBar::LeftSide, 0);
m_tabWidget->getTabBar()->setTabButton(index, QTabBar::LeftSide, loadingAnimation);
return loadingAnimation;
}