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. QTextEdit Look
Forum Updated to NodeBB v4.3 + New Features

QTextEdit Look

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 455 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.
  • H Offline
    H Offline
    Herman Nordberg
    wrote on last edited by
    #1

    I am using a QTextEdit to log messages. The widget has to resize as new messages are logged, which it does, but I don't like the look of the scrollbar. Is there a simple way to get the same scrollbar style that QScrollArea uses?
    Or is there another widget that can accomplish the same and has the QScrollArea scrollbar?

    raven-worxR 1 Reply Last reply
    0
    • H Offline
      H Offline
      Herman Nordberg
      wrote on last edited by
      #5

      Ok, thank you for your help.

      1 Reply Last reply
      0
      • H Herman Nordberg

        I am using a QTextEdit to log messages. The widget has to resize as new messages are logged, which it does, but I don't like the look of the scrollbar. Is there a simple way to get the same scrollbar style that QScrollArea uses?
        Or is there another widget that can accomplish the same and has the QScrollArea scrollbar?

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

        @Herman-Nordberg said in QTextEdit Look:

        Is there a simple way to get the same scrollbar style that QScrollArea uses?

        normally they have the same scrollbar style, since its the same QStyle subcontrol during painting.

        What platform?
        Did you maybe apply a stylesheet?
        Can you post a screenshot?

        --- 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
        0
        • H Offline
          H Offline
          Herman Nordberg
          wrote on last edited by
          #3

          You are right, it was because of a stylesheet, removing it results in a normal scroll bar.
          So I can not apply a stylesheet or is there some way? I only really want to change the border and font.

          raven-worxR 1 Reply Last reply
          0
          • H Herman Nordberg

            You are right, it was because of a stylesheet, removing it results in a normal scroll bar.
            So I can not apply a stylesheet or is there some way? I only really want to change the border and font.

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

            @Herman-Nordberg said in QTextEdit Look:

            So I can not apply a stylesheet or is there some way? I only really want to change the border and font.

            I guess as soon as you style the border of the QTextEdit all of it's subcontrols also get painted by the stylesheet style.
            You can try to wrap your QTextEdit in a plain QFrame, set an objectName on it and explicitly only style this QFrame widget instead of the QTextEdit widget.

            --- 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
            2
            • H Offline
              H Offline
              Herman Nordberg
              wrote on last edited by
              #5

              Ok, thank you for your help.

              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