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. QAction font color error.

QAction font color error.

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

    I use Linux 64Bit for Qt5.4.

    QAction * actionFontColor = new QAction ("Font Color", this);
    actionFontColor-> setText ("A");

    After doing this, I want to change the color A, which is the text set in the Action, whenever the color changes.

    What should I do?

    jsulmJ raven-worxR 2 Replies Last reply
    0
    • P Pada_

      I use Linux 64Bit for Qt5.4.

      QAction * actionFontColor = new QAction ("Font Color", this);
      actionFontColor-> setText ("A");

      After doing this, I want to change the color A, which is the text set in the Action, whenever the color changes.

      What should I do?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Pada_ said in QAction font color error.:

      After doing this, I want to change the color A, which is the text set in the Action, whenever the color changes.

      I don't get it: when does the color change? Can you explain better?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • P Pada_

        I use Linux 64Bit for Qt5.4.

        QAction * actionFontColor = new QAction ("Font Color", this);
        actionFontColor-> setText ("A");

        After doing this, I want to change the color A, which is the text set in the Action, whenever the color changes.

        What should I do?

        raven-worxR Offline
        raven-worxR Offline
        raven-worx
        Moderators
        wrote on last edited by raven-worx
        #3

        @Pada_ said in QAction font color error.:

        After doing this, I want to change the color A, which is the text set in the Action, whenever the color changes.

        this is the responsibility of the widget which visualizes the action.
        So you will need to subclass it and overrride it's paintEvent

        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
        If you have a question please use the forum so others can benefit from the solution in the future

        1 Reply Last reply
        1

        • Login

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