Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to go from animated intro to main menu
Qt 6.12 LTS is out! See what's new in the release blog

How to go from animated intro to main menu

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 384 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.
  • O Offline
    O Offline
    omardmf
    wrote on last edited by
    #1

    hey i am new at Qt development, i am trying to create an instrument cluster gui that displays an animated intro (logo fade in) upon boot.

    i only created the animated intro and now i want to go to the main menu when the animated intro ends.

    MainWindow::MainWindow(QWidget *parent)
        : QMainWindow(parent)
        , ui(new Ui::MainWindow)
    {
        ui->setupUi(this);
    
        //Background
        ui->setupUi(this);
        QPixmap bkgnd(":/rec/Images/backgorund.png");
        bkgnd = bkgnd.scaled(this->size(), Qt::IgnoreAspectRatio);
        QPalette palette;
        palette.setBrush(QPalette::Window, bkgnd);
        this->setPalette(palette);
    
        //Logo
        QPixmap iti(":/rec/Images/logo.png");
        QLabel *label = new QLabel(this);
        label->setPixmap(iti);
        QHBoxLayout *layout = new QHBoxLayout(this);
        layout->addWidget(label);
        layout->setAlignment(Qt::AlignCenter);
        QWidget *centralWidget = new QWidget(this);
        centralWidget->setLayout(layout);
        setCentralWidget(centralWidget);
    
        //Fade in effect
        QGraphicsOpacityEffect *eff = new QGraphicsOpacityEffect(this);
        label->setGraphicsEffect(eff);
        QPropertyAnimation *a = new QPropertyAnimation(eff,"opacity");
        a->setDuration(4000);
        a->setStartValue(0);
        a->setEndValue(1);
        a->setEasingCurve(QEasingCurve::InBack);
        a->start(QPropertyAnimation::DeleteWhenStopped);
    }
    
    JonBJ 1 Reply Last reply
    0
    • O omardmf

      hey i am new at Qt development, i am trying to create an instrument cluster gui that displays an animated intro (logo fade in) upon boot.

      i only created the animated intro and now i want to go to the main menu when the animated intro ends.

      MainWindow::MainWindow(QWidget *parent)
          : QMainWindow(parent)
          , ui(new Ui::MainWindow)
      {
          ui->setupUi(this);
      
          //Background
          ui->setupUi(this);
          QPixmap bkgnd(":/rec/Images/backgorund.png");
          bkgnd = bkgnd.scaled(this->size(), Qt::IgnoreAspectRatio);
          QPalette palette;
          palette.setBrush(QPalette::Window, bkgnd);
          this->setPalette(palette);
      
          //Logo
          QPixmap iti(":/rec/Images/logo.png");
          QLabel *label = new QLabel(this);
          label->setPixmap(iti);
          QHBoxLayout *layout = new QHBoxLayout(this);
          layout->addWidget(label);
          layout->setAlignment(Qt::AlignCenter);
          QWidget *centralWidget = new QWidget(this);
          centralWidget->setLayout(layout);
          setCentralWidget(centralWidget);
      
          //Fade in effect
          QGraphicsOpacityEffect *eff = new QGraphicsOpacityEffect(this);
          label->setGraphicsEffect(eff);
          QPropertyAnimation *a = new QPropertyAnimation(eff,"opacity");
          a->setDuration(4000);
          a->setStartValue(0);
          a->setEndValue(1);
          a->setEasingCurve(QEasingCurve::InBack);
          a->start(QPropertyAnimation::DeleteWhenStopped);
      }
      
      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @omardmf
      I thought somebody posted just this question a couple of hours ago and I replied to it? Did you delete that?

      Christian EhrlicherC 1 Reply Last reply
      0
      • JonBJ JonB

        @omardmf
        I thought somebody posted just this question a couple of hours ago and I replied to it? Did you delete that?

        Christian EhrlicherC Offline
        Christian EhrlicherC Offline
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @JonB said in How to go from animated intro to main menu:

        Did you delete that?

        Yes, it was deleted by him.

        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
        Visit the Qt Academy at https://academy.qt.io/catalog

        1 Reply Last reply
        1

        • Login

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