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. Custom button animations
QtWS25 Last Chance

Custom button animations

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 1.8k Views
  • 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.
  • D Offline
    D Offline
    Dragann
    wrote on last edited by
    #1

    Hello guys!

    I have been searching around the qt forums and google in general. And i can't really find a concrete answer.

    My application needs buttons that show animatons when clicked etc.

    for example:

    there are 4 buttons horizontally next to each other. When i click one button, it should show a popping animation, increase size and then lower size, but still end up bigger than the others.. the other buttons should become smaller...

    the idea behind it is that you can easily see which button is the active one... the animation should also be very smooth... it needs a android/iphone look and feel...

    as far as i have read is that i will need QML for this to work.. but as far as i can see,, people write complete applications in qml

    what i want is to create a few buttons that i can call from the c++ code.

    so my question is: is it possible to create just a few small components in qml and then use them

    or will i have to create my application, using QML primarily

    P.S. no need to spoonfeed me,, just a little direction would be nice

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mcosta
      wrote on last edited by
      #2

      Hi,

      since Qt 5.3 you can use "QQuickWidget":http://qt-project.org/doc/qt-5/qquickwidget.html to create a Widget that displays QML UI.

      "This example":http://qt-project.org/doc/qt-5/qtquick-quickwidgets-quickwidget-example.html shows how to use it.

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

      1 Reply Last reply
      0
      • D Offline
        D Offline
        Dragann
        wrote on last edited by
        #3

        Thanks alot!!! ive been going through alot of the demo's but it seems i missed this one..

        would it be viable to combine both c++ and QML or would it be better to write the application completely in QML..

        because as far as i am seeing,, all the visually beautifull and smooth application, are written completely in QML

        i will continue to research this myself with or without answers :P

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mcosta
          wrote on last edited by
          #4

          Hi,

          QQuickWidget was born to integrate QML components in existing QWidget based application.

          For a new Application problably you can write your UI in QML and the logic in C++. The only thing you cannot do (at the moment) is have a TreeView in QML.

          Bye

          Once your problem is solved don't forget to:

          • Mark the thread as SOLVED using the Topic Tool menu
          • Vote up the answer(s) that helped you to solve the issue

          You can embed images using (http://imgur.com/) or (http://postimage.org/)

          1 Reply Last reply
          0
          • D Offline
            D Offline
            Dragann
            wrote on last edited by
            #5

            mcosta, thnx alot!!

            i have allready found a lot of useful resources on the QT website... lots of good tutorials and explanations... i will be able to find my way like this,, thank you! ;)

            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