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. How to change color of title in installation?
QtWS25 Last Chance

How to change color of title in installation?

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 2 Posters 684 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.
  • N Offline
    N Offline
    narae
    wrote on last edited by narae
    #1

    I want to change color of title in installation.
    at config. xml(https://doc.qt.io/qtinstallerframework/qt-installer-framework-stylesheet-example.html)

    <TitleColor>#FFFFFF</TitleColor>
    

    : Color of title in installation screen is white.

    I create controller.qs

    function Controller()
    {
        
    }
    
    Controller.prototype.IntroductionPageCallback = function()
    {
        var widget = gui.currentPageWidget();
        if(widget != null){
            widget.title = "New title";
            widget.MessageLabel.setText("New Message");
        }
    }
    

    config.xml (https://doc.qt.io/qtinstallerframework/noninteractive.html)

    <TitleColor>#123456</TitleColor>
    <ControlScript>controller.qs</ControlScript>
    

    Then only the title color of the IntroductionPage is black.
    How can I change color of title in IntroductionPage to white?

    ++
    I consider to use style sheet, but I couldn't find element for color of title.
    (https://doc.qt.io/qt-5/stylesheet-reference.html)

    1 Reply Last reply
    0
    • B Offline
      B Offline
      Bonnie
      wrote on last edited by
      #2

      What do you exactly want?
      I'm very confused by your description...
      Do you mean you want the title to be white in the IntroductionPage but black in other pages?

      N 1 Reply Last reply
      0
      • B Bonnie

        What do you exactly want?
        I'm very confused by your description...
        Do you mean you want the title to be white in the IntroductionPage but black in other pages?

        N Offline
        N Offline
        narae
        wrote on last edited by narae
        #3

        @Bonnie No, the title color of all pages must be white. But after adding controller.qs, IntroductionPage's title color is black. The title changes to "New Title" in controller.qs.

        B 1 Reply Last reply
        0
        • N narae

          @Bonnie No, the title color of all pages must be white. But after adding controller.qs, IntroductionPage's title color is black. The title changes to "New Title" in controller.qs.

          B Offline
          B Offline
          Bonnie
          wrote on last edited by
          #4

          @narae
          Then do you have to change the title text?
          If you don't change it, it will be white.

          N 1 Reply Last reply
          0
          • B Bonnie

            @narae
            Then do you have to change the title text?
            If you don't change it, it will be white.

            N Offline
            N Offline
            narae
            wrote on last edited by
            #5

            @Bonnie Yes, I need to change text of title.

            B 1 Reply Last reply
            0
            • N narae

              @Bonnie Yes, I need to change text of title.

              B Offline
              B Offline
              Bonnie
              wrote on last edited by
              #6

              @narae
              Ok.
              Actually the installer set the title color by using rich text (html code).
              So you can do the same

              widget.title = "<font color=\"#FFFFFF\">New title</font>";
              
              N 1 Reply Last reply
              3
              • B Bonnie

                @narae
                Ok.
                Actually the installer set the title color by using rich text (html code).
                So you can do the same

                widget.title = "<font color=\"#FFFFFF\">New title</font>";
                
                N Offline
                N Offline
                narae
                wrote on last edited by
                #7

                @Bonnie Thanks for you answer. It works.

                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