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. fade in and out of bunch of label inside QVBoxLayout with animation
Forum Updated to NodeBB v4.3 + New Features

fade in and out of bunch of label inside QVBoxLayout with animation

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

    Hi, I have a QVBoxLayout that I have a bunch of label inside it
    I need to be able to fade in and out all of the label inside it in same time with an animation
    so I wonder how can I get all of the labels inside a QVBoxLayout and fade in or out them?
    thanks in advance.

    Pl45m4P 1 Reply Last reply
    0
    • S saeid0034

      Hi, I have a QVBoxLayout that I have a bunch of label inside it
      I need to be able to fade in and out all of the label inside it in same time with an animation
      so I wonder how can I get all of the labels inside a QVBoxLayout and fade in or out them?
      thanks in advance.

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by Pl45m4
      #2

      @saeid0034

      Make a new widget, put your VBoxLayout with your labels inside and fade-out or fade-in the whole widget using QGraphicsOpacityEffect and QPropertyAnimation.

      • https://doc.qt.io/qt-5/qgraphicsopacityeffect.html#details

      • https://doc.qt.io/qt-5/qpropertyanimation.html#details


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      S 1 Reply Last reply
      2
      • Pl45m4P Pl45m4

        @saeid0034

        Make a new widget, put your VBoxLayout with your labels inside and fade-out or fade-in the whole widget using QGraphicsOpacityEffect and QPropertyAnimation.

        • https://doc.qt.io/qt-5/qgraphicsopacityeffect.html#details

        • https://doc.qt.io/qt-5/qpropertyanimation.html#details

        S Offline
        S Offline
        saeid0034
        wrote on last edited by
        #3

        @Pl45m4 no I can't do this, because there is other things inside layout that I don't want to fade
        I want only labels

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @saeid0034 said in fade in and out of bunch of label inside QVBoxLayout with animation:

          so I wonder how can I get all of the labels inside a QVBoxLayout

          See qFindChildren(). Or put all pointers to your desired labels in a container when you create them.

          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
          3

          • Login

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