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. [solved] Change icon using QAnimate or QStateMachine?
Forum Updated to NodeBB v4.3 + New Features

[solved] Change icon using QAnimate or QStateMachine?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.4k 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.
  • J Offline
    J Offline
    jsprenkle
    wrote on last edited by
    #1

    I can't seem to get the icon on a pushbutton to change using a state machine.
    I'm currently doing this:

    @State->assignProperty( widget.pushButton, "icon", ":/LeftArrow.png" );@

    Another property for the same state is being set:
    @State->assignProperty( widget.pushButton, "text", "logged in" );@
    So I'm sure the state is getting transitioned to.

    Thanks!

    1 Reply Last reply
    0
    • F Offline
      F Offline
      Franzk
      wrote on last edited by
      #2

      Try to be more specific:
      @State->assignProperty( widget.pushButton, "icon", QIcon(":/LeftArrow.png") );@

      "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jsprenkle
        wrote on last edited by
        #3

        Ah ha! Thanks Franz

        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