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. Sliding movement of one widget from other one
Forum Updated to NodeBB v4.3 + New Features

Sliding movement of one widget from other one

Scheduled Pinned Locked Moved General and Desktop
qpropertyanimatslidingwidget
4 Posts 3 Posters 1.9k Views 3 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
    Sergei_Pet
    wrote on last edited by
    #1

    I am a beginner in QT. Please advise me how to solve within QT a following task.

    I need to make sliding slowly movement of one widget from other one, happened by clicking the button on the first widget.

    Initially only the first widget is visible. Then, by clicking the button on the first one, the second widget (of the same size) is appearing as sliding widget from right boundary of the first widget, sliding to right direction till it appears in full.

    This both widgets should be represented by a single icon in the Windows tray.

    As far as I understand I should use QPropertyAnimation Class. But I do not understand how to implement QPropertyAnimation item into the first widget to provide its control on the second widget.

    Please help!

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

      Hi and welcome to devnet,

      If I understand you correctly, these two widgets are located in the same "base" widget on the screen, right ?

      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
      • G Offline
        G Offline
        GrahamL
        wrote on last edited by
        #3

        Hi
        I would use a stacked widget and animate the transition from one widget to another

        HTH

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

          You still first need to move your widget and only then can you put it in your QStackedWidget's layout.

          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