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. [Solved] Changing the color of a QFrame
Forum Updated to NodeBB v4.3 + New Features

[Solved] Changing the color of a QFrame

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 5.2k 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.
  • E Offline
    E Offline
    Endless
    wrote on last edited by
    #1

    I've got several lines (which turn out to be QFrames) in my application. Since the background is close to black, these lines have to be a lighter color. I've been looking into ways to change the color, and the only thing I came up with is setPallette, but this doesn't seem to be what I'm looking for. How do I change the color of these lines?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      miroslav
      wrote on last edited by
      #2

      There is no direct way to set the line color (something like "setColor(foo)" does not exist). You either do need to change the palette, or use CSS style sheets. The latter is usually simpler and slightly slower.

      Mirko Boehm | mirko@kde.org | KDE e.V.
      FSFE Fellow
      Qt Certified Specialist

      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