Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Solved How to change color of title in installation?

    General and Desktop
    2
    7
    345
    Loading More Posts
    • 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
      narae last edited by narae

      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 Reply Quote 0
      • B
        Bonnie last edited by

        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 Reply Quote 0
        • N
          narae @Bonnie last edited by 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 1 Reply Last reply Reply Quote 0
          • B
            Bonnie @narae last edited by

            @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 Reply Quote 0
            • N
              narae @Bonnie last edited by

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

              B 1 Reply Last reply Reply Quote 0
              • B
                Bonnie @narae last edited by

                @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 Reply Quote 3
                • N
                  narae @Bonnie last edited by

                  @Bonnie Thanks for you answer. It works.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post