void tst_QMovie::construction() { QMovie movie; QCOMPARE(movie.device(), (QIODevice *)0); QCOMPARE(movie.fileName(), QString()); QCOMPARE(movie.state(), QMovie::NotRunning); }
void QtWin::setStatusActive(bool active) { if (active == lastStatusActive) return; lastStatusActive = active; if (active) { ui->statusLabel->clear(); QMovie *movie = new QMovie(":/icons/running.gif"); ui->statusLabel->setMovie(movie); movie->start(); ui->statusLabel->setToolTip("Simulation is running"); ui->stopPushButton->setEnabled(true); } else { QMovie *movie = ui->statusLabel->movie(); if (movie) { ui->statusLabel->clear(); delete movie; } ui->statusLabel->setPixmap(QPixmap(":/icons/idle.png")); ui->statusLabel->setToolTip("Simulation has ended"); ui->stopPushButton->setEnabled(false); } }
FtpApp::FtpApp() { manager = new QNetworkAccessManager(this); setWindowTitle("JIGS File Sharing"); setGeometry(430,300,555,400); QMovie *movie = new QMovie(":/images/waiting.gif"); processLabel = new QLabel(this); processLabel->setMovie(movie); movie->start(); splash = new QSplashScreen; splash->setPixmap(QPixmap(":/images/FtpSplash.png")); splash->show(); createStatusBar(); createActions(); createMenus(); fileList = new QTreeWidget; fileList->setEnabled(false); fileList->setRootIsDecorated(false); fileList->setHeaderLabels(QStringList() << tr("Name") << tr("Size") << tr("Owner") << tr("Group") << tr("Time")); fileList->setColumnWidth(0,150); connect(fileList,SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)),this,SLOT(downloadFile(QTreeWidgetItem*))); getFiles(); }
QInputOutputPacsWidget::QInputOutputPacsWidget(QWidget *parent) : QWidget(parent) { setupUi(this); createContextMenuQStudyTreeWidget(); Settings settings; settings.restoreColumnsWidths(InputOutputSettings::PACSStudyListColumnsWidth, m_studyTreeWidget->getQTreeWidget()); QStudyTreeWidget::ColumnIndex sortByColumn = (QStudyTreeWidget::ColumnIndex) settings.getValue(InputOutputSettings::PACSStudyListSortByColumn).toInt(); Qt::SortOrder sortOrderColumn = (Qt::SortOrder) settings.getValue(InputOutputSettings::PACSStudyListSortOrder).toInt(); m_studyTreeWidget->setSortByColumn (sortByColumn, sortOrderColumn); m_statsWatcher = new StatsWatcher("QueryInputOutputPacsWidget", this); m_statsWatcher->addClicksCounter(m_retrievAndViewButton); m_statsWatcher->addClicksCounter(m_retrieveButton); // Preparem el QMovie per indicar quan s'estan fent consultes al PACS QMovie *operationAnimation = new QMovie(this); operationAnimation->setFileName(":/images/loader.gif"); m_queryAnimationLabel->setMovie(operationAnimation); operationAnimation->start(); setQueryInProgress(false); createConnections(); }
void LoginWidget::checkLogin() { QString user = _editUsername->text(); QString pass = _editPassword->text(); QString ip = _editIp->text(); QMovie *movie = new QMovie("./gui/ring.gif"); QLabel *processLabel = new QLabel(this); processLabel->setMovie(movie); movie->start(); _userString = user.toUtf8().constData(); _passString = pass.toUtf8().constData(); _ipString = ip.toUtf8().constData(); if (_userString == "" || _passString == "" || _ipString == "") { QMessageBox *msgBox = new QMessageBox(this); msgBox->setText("Please fill the fields"); msgBox->exec(); } else { _editPassword->clear(); this->clearLayout(_mainLayout); _mainLayout->addWidget(processLabel, 0, 0, Qt::AlignCenter); g_PTUser.logUser(_userString, _passString, _ipString); } }
int main(int argc, char *argv[]) { QApplication a(argc, argv); QMovie *mov = new QMovie(":/img/pics/start.gif"); QLabel *label = new QLabel("",0); label->setGeometry(450,200,500,300); label->setMovie(mov); mov->start(); label->setWindowFlags(Qt::FramelessWindowHint); label->show(); QTime t; t.start(); while(t.elapsed() < 1500) { a.processEvents(); } MainWindow w; w.show(); w.move((QApplication::desktop()->width()-w.width())/2,(QApplication::desktop()->height()-w.height())/2); label->close(); return a.exec(); }
ImportDialog::ImportDialog(QWidget *parent) : QDialog(parent), ui(new Ui::ImportDialog) { ui->setupUi(this); ui->stackedWidget->setAnimation(QEasingCurve::Linear); ui->stackedWidget->setSpeed(200); ui->badgeSuccess->setActive(true); ui->badgeSuccess->setBadgeType(Badge::LabelSuccess); ui->badgeSuccess->setShowActiveMark(true); QMovie *loadingMovie = new QMovie(":/img/spinner.gif"); loadingMovie->start(); ui->loading->setMovie(loadingMovie); m_timer.setInterval(500); m_posterDownloadManager = new DownloadManager(this); connect(m_posterDownloadManager, SIGNAL(downloadFinished(DownloadManagerElement)), this, SLOT(onEpisodeDownloadFinished(DownloadManagerElement))); connect(ui->movieSearchWidget, SIGNAL(sigResultClicked()), this, SLOT(onMovieChosen())); connect(ui->concertSearchWidget, SIGNAL(sigResultClicked()), this, SLOT(onConcertChosen())); connect(ui->tvShowSearchEpisode, SIGNAL(sigResultClicked()), this, SLOT(onTvShowChosen())); connect(ui->btnImport, SIGNAL(clicked()), this, SLOT(onImport())); connect(&m_timer, SIGNAL(timeout()), this, SLOT(onFileWatcherTimeout())); }
//使用数据函数 void MainWindow::httpReadyRead() //有可用数据 { if(reply->error() == QNetworkReply::NoError) { //获取字节流构造 QPixmap 对象 currentPicture->loadFromData(reply->readAll()); QFileInfo info(url.path());//分解出文件名 qDebug() << "url.path" << url.path(); QString fileName(info.fileName());//获取文件名 //如果文件名为空,则使用“index.html” ,例如使用“http://www.yafeilinux.com” 时,文件名就为空 if (fileName.isEmpty()) { fileName = "index.html";//因为地址中可能没有文件名,这时我们就使用一个默认的文件名。 } fileName.append(".jpg"); qDebug() << "fileName" << fileName; //QDateTime now; //QString filename = now.currentDateTime().toString("yyMMddhhmmss.jpg"); currentPicture->save(fileName);//保存图片 //qDebug()<<"picture saved as "<<filename; currentFileName = fileName; //可以在onpaint中 用QPixmap 显示currentPicture,则这种方法则不需要保存 //显示图片, QMovie *move = new QMovie(currentFileName); //label自动适应图片大小显示 ui->labelVerificationCode->resize(QPixmap(fileName).width(), QPixmap(fileName).height()); ui->labelVerificationCode->setMovie(move); move->start(); } }
void anibutton::setButtonIcon(int frame) // member function that catches the frameChanged signal of the QMovie { if(!this->isChecked())return; Q_UNUSED(frame) QMovie* pMovie = (QMovie*)sender(); this->setIcon(QIcon(pMovie->currentPixmap())); }
ImagePreviewer::ImagePreviewer(QWidget *parent) : QDialog(parent), ui(new Ui::ImagePreviewer) { cancelled = false; imagesCount = 0; multiMode = false; ui->setupUi(this); setWindowFlags(Qt::Window | Qt::CustomizeWindowHint | Qt::WindowCloseButtonHint | Qt::WindowMaximizeButtonHint | Qt::WindowSystemMenuHint | Qt::WindowTitleHint); QtWin::extendFrameIntoClientArea(this); QGraphicsDropShadowEffect* ds = new QGraphicsDropShadowEffect; ds->setColor(Qt::white); ds->setOffset(0,0); ds->setBlurRadius(4); ui->loaderLabel->setGraphicsEffect(ds); ui->statusLabel->setGraphicsEffect(ds); QMovie* m = new QMovie(":/resources/RES/loader.gif"); ui->loaderLabel->setMovie(m); m->setCacheMode(QMovie::CacheAll); m->start(); imagePreview = new QGraphicsScene; ui->graphicsView->setScene(imagePreview); ui->graphicsView->setBackgroundBrush(QPixmap(":/resources/RES/alpha.png")); restoreGeometry(ideSettings::getByteArray(S_IMAGEPREVIEW_GEOMETRY)); }
void Tank::deleteTank() { alive = false; head->setPixmap(QPixmap(":/images/images/empty.png").scaled(pixsize,pixsize)); setPixmap(QPixmap(":/images/images/empty.png").scaled(pixsize,pixsize)); int stime; long ltime; int random; ltime = time(NULL); stime = (unsigned) ltime/2; srand(stime); random = rand()%3 +1; QMediaPlayer *explode = new QMediaPlayer(); explode->setMedia(QUrl("qrc:/sounds/sounds/tank/explode" + QString::number(random) + ".mp3")); explode->play(); // анимация gif_anim = new QLabel(); gif_anim->setStyleSheet("background-color: transparent;"); QMovie *movie = new QMovie(":/images/images/anim/Explo.gif"); gif_anim->setMovie(movie); gif_anim->move(x()-25,y()-25); movie->setScaledSize(QSize(250,250)); movie->start(); QGraphicsProxyWidget *proxy = game->scene->addWidget(gif_anim); QTimer::singleShot(2500, this, SLOT(deleteGif())); }
ExplorerWidget::ExplorerWidget(MainWindow *parentMainWindow) : BaseClass(parentMainWindow), _progress(0) { _treeWidget = new ExplorerTreeWidget(this); QHBoxLayout *vlaout = new QHBoxLayout(); vlaout->setMargin(0); vlaout->addWidget(_treeWidget, Qt::AlignJustify); VERIFY(connect(_treeWidget, SIGNAL(itemExpanded(QTreeWidgetItem *)), this, SLOT(ui_itemExpanded(QTreeWidgetItem *)))); VERIFY(connect(_treeWidget, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this, SLOT(ui_itemDoubleClicked(QTreeWidgetItem *, int)))); // Temporarily disabling export/import feature //VERIFY(connect(_treeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), // parentMainWindow, SLOT(onExplorerItemSelected(QTreeWidgetItem *)))); setLayout(vlaout); QMovie *movie = new QMovie(":robomongo/icons/loading.gif", QByteArray(), this); _progressLabel = new QLabel(this); _progressLabel->setMovie(movie); _progressLabel->hide(); movie->start(); }
void DWindowUI::SwitchToProcessUI() { QLayoutItem *child; while ((child = actionLayout_->takeAt(0)) != 0) { if (child->widget()) { child->widget()->setVisible(false); } } while ((child = selectLayout_->takeAt(0)) != 0) { if (child->widget()) { child->widget()->setVisible(false); } } QLabel *processHints = new QLabel(tr("<a style='color:#ffffff; font-size:12px'>Please </a>" "<a style='color:#ebab4c; font-size:12px'>DO NOT</a>" "<a style='color:#ffffff; font-size:12px'> remove the USB flash drive or shutdown while file is writing.<a>")); processHints->setFixedWidth(labelMaxWidth); processHints->setWordWrap(true); selectLayout_->addStretch(); selectLayout_->addWidget(processHints); selectLayout_->setAlignment(processHints, Qt::AlignVCenter); usbLabel_->setText("<p style='color:white; font-size:10px;'>0% </p>"); QMovie *processMovie = new QMovie(":/ui/images/process-active.gif"); processLabel_->setMovie(processMovie); processMovie->start(); processTimer_ = new QTimer(this); processTimer_->setInterval(5000); connect(processTimer_, SIGNAL(timeout()), this, SLOT(checkProcess())); processTimer_->start(); isoLabel_->start(); }
void TestConnectivity::setButtonIcon(int){ QMovie* caller = (QMovie*)QObject::sender(); int id = this->myMovies[caller]; if(ui->listWidget->count() > 0){ ui->listWidget->item(id)->setIcon(QIcon(caller->currentPixmap())); } }
void PixmapListDialog::setMovie( const QByteArray& image ) { if ( label->movie() ) delete label->movie(); if ( movie_buffer ) delete movie_buffer; movie_buffer = new QBuffer(); movie_buffer->buffer() = image; movie_buffer->open( QIODevice::ReadOnly ); QMovie *pm = new QMovie( movie_buffer ); QBuffer *movie_buffer_tmp = new QBuffer(); movie_buffer_tmp->buffer() = image; movie_buffer_tmp->open( QIODevice::ReadOnly ); QMovie *pm_tmp = new QMovie( movie_buffer_tmp ); pm_tmp->jumpToFrame ( 0 ); QImage background_image = pm_tmp->currentImage(); QSize scaled_size = pm_tmp->currentImage().size(); pm_tmp->stop(); delete pm_tmp; delete movie_buffer_tmp; scaled_size.scale( background_label->size(), Qt::KeepAspectRatio ); pm->setScaledSize( scaled_size ); background_label->setPixmap( QPixmap::fromImage( background_image.scaled( scaled_size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation ) ) ); pm->setCacheMode( QMovie::CacheAll ); label->setMovie( pm ); label->movie()->start(); }
void BattleForm::setGif(QString gif, QLabel *label) { QMovie *movie = new QMovie(gif); label->setMovie(movie); label->setScaledContents(true); movie->start(); }
Connecting::Connecting(QWidget *parent) : QWidget(parent), m_client(NULL), m_task(NULL), state(0), tries(0) { ui.setupUi(this); connect(&m_timer, SIGNAL(timeout()), this, SLOT(proceed())); connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(abort())); QMovie* movie = new QMovie(":/preloader/cube"); // Make sure the GIF was loaded correctly if (!movie->isValid()) { // Something went wrong :( ui.preloader->setText("Loading"); } else { // Play GIF ui.preloader->setMovie(movie); movie->start(); } m_try_limit = 6; QFont fnt(ui.btnCancel->font()); fnt.setFamily("Ubuntu Light"); fnt.setPointSize(16); ui.btnCancel->setFont(fnt); }
void DProgressFrame::switchProgress() { m_UsbLabel->setStatus(DDevIcon::Progress); m_IsoLabel->setStatus(DImageIcon::Progress); m_IsoLabel->setDisabled(true); QMovie *process = new QMovie(":/ui/images/process-active.gif"); m_ProcessLabel->setMovie(process); process->start(); }
void MainWindow::setImg() { if(!this->imgdir.dirExist || this->imgdir.fileList.length() == 0) { QPixmap empty; ui->imgLabel->setPixmap(empty); if(!this->imgdir.dirExist) ui->imgLabel->setText("Path is invalid, is not a directory?"); else ui->imgLabel->setText("Couldn't find any image in the directory"); return; } // in case index is outbounds, should not happen if(index > imgdir.fileList.count()) return; QString temp = imgdir.dir.absoluteFilePath(imgdir.fileList.value(index)); dbg << imgdir.fileList.value(index).toStdString().c_str() << std::endl; dbg << temp.toStdString().c_str() << std::endl; dbg << index << std::endl; QPixmap imgtemp; imgtemp.load(temp.toStdString().c_str()); if(scaleImg) { if(imgtemp.height() > program_settings.retrive_as_int(MAX_HEIGHT_SETT)) imgtemp = imgtemp.scaledToHeight( program_settings.retrive_as_int(MAX_HEIGHT_SETT), Qt::SmoothTransformation); if(imgtemp.width() > program_settings.retrive_as_int(MAX_WIDTH_SETT)) imgtemp = imgtemp.scaledToWidth( program_settings.retrive_as_int(MAX_WIDTH_SETT), Qt::SmoothTransformation); } if(temp.endsWith(".gif",Qt::CaseInsensitive) || temp.endsWith(".webm",Qt::CaseInsensitive)) // not yet support for webm { QMovie *movie = new QMovie(temp.toStdString().c_str()); ui->imgLabel->setMovie(movie); movie->start(); dbg << "movie" << std::endl; }else { ui->imgLabel->setPixmap(imgtemp); } adjustScrollArea(); imgdir.saveIndex(imgdir.buildPath( program_settings.retrive(DIR1_SETT),"i.txt").c_str(), index); updateFileName(); coutdebug(); }
void InfoWidget::updateFieldLabel(IInfoWidget::InfoField AField) { switch (AField) { case AccountName: { QString name = field(AField).toString(); ui.lblAccount->setText(Qt::escape(name)); ui.lblAccount->setVisible(isFieldVisible(AField) && !name.isEmpty()); break; } case ContactName: { QString name = field(AField).toString(); IRosterItem ritem = FRoster ? FRoster->rosterItem(FContactJid) : IRosterItem(); if (isFiledAutoUpdated(AField) && ritem.name.isEmpty()) ui.lblName->setText(Qt::escape(FContactJid.full())); else ui.lblName->setText(QString("<big><b>%1</b></big> - %2").arg(Qt::escape(name)).arg(Qt::escape(FContactJid.full()))); ui.lblName->setVisible(isFieldVisible(AField)); break; } case ContactStatus: { QString status = field(AField).toString(); ui.lblStatus->setText(Qt::escape(status)); ui.lblStatus->setVisible(isFieldVisible(AField) && !status.isEmpty()); break; } case ContactAvatar: { if (ui.lblAvatar->movie()!=NULL) ui.lblAvatar->movie()->deleteLater(); QString fileName = field(AField).toString(); if (!fileName.isEmpty()) { QMovie *movie = new QMovie(fileName,QByteArray(),ui.lblAvatar); QSize size = QImageReader(fileName).size(); size.scale(QSize(32,32),Qt::KeepAspectRatio); movie->setScaledSize(size); ui.lblAvatar->setMovie(movie); movie->start(); } else { ui.lblAvatar->setMovie(NULL); } ui.lblAvatar->setVisible(isFieldVisible(AField) && !fileName.isEmpty()); break; } default: break; } }
ContinuedGameMenuWindow::ContinuedGameMenuWindow(QWidget *parent) : QWidget(parent), ui(new Ui::ContinuedGameMenuWindow) { ui->setupUi(this); QMovie *movie = new QMovie("/Users/Resources/Usa-flag.gif"); ui->FlagLabel->setMovie(movie); movie->start(); }
void TabbedWebView::stopAnimation() { QMovie* mov = animationLoading(tabIndex(), false)->movie(); if (mov) { mov->stop(); } showIcon(); }
FindingServerDialog::FindingServerDialog(QWidget *parent) : QDialog(parent), cancel_(false) { ui.setupUi(this); QMovie *movie = new QMovie(":/SharedPainter/Resources/findingserver.gif"); movie->start(); ui.labelAnimation->setMovie(movie); }
GuardDog::GuardDog(CharacterSheet& cs, QWidget *parent) : QDialog(parent), ui(new Ui::GuardDog) { ui->setupUi(this); QMovie *movie = new QMovie(":images/images/animated-dog-2.gif"); ui->label->setMovie(movie); movie->start(); }
void AutoResizeImageLabel::setImage( QString fileName, int frameCount ) { _nativeUsed = false; _frameCount = frameCount; QMovie* movie = new QMovie( fileName ); if ( movie->isValid() && //image files have FrameCount -1 ( movie->frameCount() == 0 || movie->frameCount() > 1 ) ) { //PLease Do not Leave out this line of Code Crucial for Pixture animated gif differentiation connect( movie, SIGNAL( frameChanged( int ) ), this, SLOT( animationFrameChanged( int ) ) ); setMovie_internal( movie ); } else {
//connect(p, SIGNAL(SendAnswer(QString,QString,bool)), this, SLOT(ReceiveAnswer(QString,QString,bool))); void PraxisDlg::on__pSbumitBtn_clicked() { int nOK = 0; //答对的题数 map<QString, ANSWER>::iterator Iter = _mapAnswer.begin(); while( Iter != _mapAnswer.end() ) { if( Iter->second.bIsOK ) { ++nOK; } ++Iter; } int nScore = 0; if( _total > 0 ) { nScore = 100/_total*nOK; } CustomEvent *e = new CustomEvent(QEvent::Type(UPDATE_COURSE_SCORE)); e->_nScore = nScore; e->_sCourseId = _sCourseId; /// 记录分数到服务器 qDebug() << g_uid; qDebug() << _sCourseId; qDebug() << nScore; QString sUrl = QString("http://120.55.119.93/course/index.php?m=Api&c=user&a=score&uid=%1&cid=%2&score=%3") .arg(g_uid).arg(_sCourseId).arg(QString::number(nScore)); NetWork *pNetWork = NetWork::GetInstance(); // connect(pNetWork, SIGNAL(regResponse(QVariant)), this, SLOT(sRegResponse(QVariant))); pNetWork->SetUrl(this, objectName() + "_score", sUrl); QCoreApplication::sendEvent(_pCourseObj, e); //将得分设置到课程列表界面 /// 根据分数展示gif动画 QString fileName; if (nScore >= 90) fileName = ":/images/success.gif"; else fileName = ":/images/fail.gif"; QPixmap pix(fileName); _lblGif->setFixedSize(pix.width(), pix.height()); _lblGif->move(this->width() / 2 - pix.width() / 2, this->height() / 2 - pix.height() / 2); QMovie *movie = new QMovie(fileName); _lblGif->setMovie(movie); _lblGif->show(); _lblGif->raise(); movie->start(); _timer->start(3000); // this->hide(); }
void tst_QMovie::infiniteLoop() { QLabel label; label.show(); QMovie *movie = new QMovie(QLatin1String(":animations/corrupt.gif"), QByteArray(), &label); label.setMovie(movie); movie->start(); QTestEventLoop::instance().enterLoop(1); QTestEventLoop::instance().timeout(); }
void UIImageViewer::loadImage(int i) { QFile f; QPixmap p; QString filename; if (!this->isVisible()) { ui->image->clear(); show(); } QLOG_TRACE() << "ImageViewer :: Loading image " << currentImage << "from" << imagesToDisplay.count(); rotation = 0; if (imagesToDisplay.count() > i) { filename = imagesToDisplay.value(i); if (f.exists(filename)) { f.setFileName(filename); ui->statusbar->showMessage("Working..."); if (ui->image->movie() != 0) ui->image->movie()->stop(); if (filename.endsWith(".gif")) { // Always assume gifs are animated -> therefore use QMovie for playback QMovie *movie = new QMovie(filename); ui->image->setMovie(movie); movie->start(); ui->statusbar->showMessage("Loaded image " + filename, 2000); ui->lCurrentImage->setText(QString("%1/%2").arg(currentImage+1).arg(imagesToDisplay.count())); ui->lImageInfo->setText(""); } else { if (p.load(filename)) { originalPixmap = p; transformPixmap(); fitImage(); ui->statusbar->showMessage("Loaded image " + filename, 2000); ui->lCurrentImage->setText(QString("%1/%2").arg(currentImage+1).arg(imagesToDisplay.count())); ui->lImageInfo->setText(QString("Resolution: %1x%2, Size: %3kB") .arg(originalPixmap.width()) .arg(originalPixmap.height()) .arg(f.size()/1024) ); } else { QLOG_ERROR() << "ImageViewer :: Error loading image" << filename; } } } if (runSlideshow) slideshowTimer->start(); } }
QIcon getCurrentIcon() { QMovie* movie = getMovie(); int idx = movie->currentFrameNumber(); QString key = QString("%1").arg(idx); if (!icons.contains(key)) { QPixmap pm = movie->currentPixmap(); QIcon retval(pm); icons[key] = retval; } return icons[key]; }
void ReceiveCoinsDialog::showBuyGuldenDialog() { #ifdef WIN32 if (WIN32) { QDesktopServices::openUrl(QUrl("https://gulden.com/purchase")); return; } #endif #if defined(HAVE_WEBENGINE_VIEW) || defined(HAVE_WEBKIT) ui->receiveCoinsStackedWidget->setCurrentIndex(1); ui->accountRequestPaymentButtonComposite->setVisible(false); ui->accountBuyGuldenButton->setVisible(false); ui->accountSaveQRButtonComposite->setVisible(false); ui->accountCopyToClipboardButtonComposite->setVisible(false); ui->cancelButton->setVisible(true); ui->closeButton->setVisible(false); ui->cancelButtonGroup->setVisible(true); ui->generateRequestButton->setVisible(false); ui->generateAnotherRequestButton->setVisible(false); ui->accountBuyButton->setVisible(true); QMovie* movie = new QMovie(":/Gulden/loading_animation"); if (movie && movie->isValid()) { ui->loadingAnimationLabel->setVisible(true); buyView->setVisible(false); movie->setScaledSize(QSize(30, 30)); ui->loadingAnimationLabel->setMovie(movie); movie->start(); } else { ui->loadingAnimationLabel->setVisible(false); buyView->setVisible(true); if (movie) delete movie; } buyView->load(QUrl("https://gulden.com/purchase")); #if defined(HAVE_WEBENGINE_VIEW) buyView->page()->setBackgroundColor(Qt::transparent); #else QPalette palette = buyView->palette(); palette.setBrush(QPalette::Base, Qt::transparent); buyView->page()->setPalette(palette); buyView->setAttribute(Qt::WA_OpaquePaintEvent, false); buyView->page()->setLinkDelegationPolicy(QWebPage::DontDelegateLinks); #endif connect(buyView, SIGNAL(loadFinished(bool)), this, SLOT(loadBuyViewFinished(bool))); #endif }