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. Applying Faderwidget class (from configdialog)
Forum Updated to NodeBB v4.3 + New Features

Applying Faderwidget class (from configdialog)

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 1.4k Views 2 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.
  • H Offline
    H Offline
    houmingc
    wrote on last edited by
    #1

    Took faderWidget class (from configdialog) and want to apply on Hlayout.
    want Hlayout to turn red and reappear again.
    Understand i have to put two layout onto QStackedWidget
    h file ///////////////////////////////////////////////
    QPointer<FaderWidget> faderWidget;
    QStackedWidget *pagesWidget;

    cpp file /////////////////////////////////////////////////////////////
    Hlayout = new QHBoxLayout();
    Hlayout->addWidget(button1);
    Hlayout->addWidget(stationlabel);
    Hlayout->addWidget(myTime2);
    Hlayout->addWidget(separator);
    Hlayout->addWidget(DateLabel2);
    QTimer::singleShot(60000,this,&MainWindow::fadeInWidget());

    pagesWidget = new QStackedWidget;
    pagesWidget->addWidget(new ConfigurationPage);
    pagesWidget->addWidget(new UpdatePage);
    pagesWidget->addWidget(new QueryPage);
    

    void MainWindow::fadeInWidget()
    {
    if (faderWidget)
    faderWidget->close();
    faderWidget = new FaderWidget();
    faderWidget->start();
    }

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What is FaderWidget ? Where did you get if from ? Depending on how you use it, why not use a QStackedLayout with your FadeInWidget ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • H Offline
        H Offline
        houmingc
        wrote on last edited by
        #3

        Need to accomplished the banner flip on the top of the video. Any Advice
        https://videobin.org/+8uu/brf.html

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          I'd take a look at the graphics view framework especially if the rest of your application needs more of this kind of stuff or Qt Quick

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • H Offline
            H Offline
            houmingc
            wrote on last edited by
            #5

            I am thinking of using scaling from a square to fill up whole Qwidget.
            Is this viable?

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              So creating an overlay widget on top of the other and paint it e.g. green + transparent ? Sure, then you should take a look at the animation framework to update automatically the width of the rectangle.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              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