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. Can't resize QSplitter's children after customization
Forum Updated to NodeBB v4.3 + New Features

Can't resize QSplitter's children after customization

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 3.6k 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.
  • B Offline
    B Offline
    Byron Lai
    wrote on last edited by
    #1

    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
    0
    • G Offline
      G Offline
      giesbert
      wrote on last edited by
      #2

      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
      0
      • B Offline
        B Offline
        Byron Lai
        wrote on last edited by
        #3

        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
        0
        • G Offline
          G Offline
          giesbert
          wrote on last edited by
          #4

          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
          0
          • M Offline
            M Offline
            M_31
            wrote on last edited by
            #5

            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
            0

            • Login

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