Qt Forum

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

    Can't resize QSplitter's children after customization

    General and Desktop
    3
    5
    3078
    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.
    • B
      Byron Lai last edited by

      The handle doesn't show up when the mouse cursor hovers over the splitter after I apply the following stylesheet

      @QSplitter::handle {
      color: rgb(145, 145, 145);
      width: 1px;
      }@

      1 Reply Last reply Reply Quote 0
      • G
        giesbert last edited by

        Hi Byron,

        it is only 1 pixel width, that is not much.

        I assume you just don't see it, as it is too small.

        Nokia Certified Qt Specialist.
        Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

        1 Reply Last reply Reply Quote 0
        • B
          Byron Lai last edited by

          Thanks Gerolf
          There is a mistake in my original stylesheet
          Now I can resize the splitter's children
          It should be
          @QSplitter::handle:vertical {
          color: rgb(145, 145, 145);
          height: 1px;
          }@
          But setting color to rgb(145, 145, 145) doesn't change the splitter's appearance
          Is subclassing QSplitter and QSplitterHandlethe the only way to change the splitter's appearance to a plain straight line?

          1 Reply Last reply Reply Quote 0
          • G
            giesbert last edited by

            you could try background instead of color. color is typically used for foreground. But I never tried this.

            Nokia Certified Qt Specialist.
            Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

            1 Reply Last reply Reply Quote 0
            • M
              M_31 last edited by

              Hi...
              I am also facing similar problem...like this..
              I have set the stylesheet of my QSplitter as

              @
              parentsplitter->setStyleSheet("QSplitter { border-color: rgb(255, 0, 0); color: rgb(145, 145, 145); height: 5px;background-color: rgb(225,230,234); }");

              @

              But i can see only the background color of my QSplitter is getting changed, but i want to change my border color of QSplitter from my main window..

              Please help me on this..

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