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. Qt 6.4 is not respecting my background colours on vertical header items
Forum Updated to NodeBB v4.3 + New Features

Qt 6.4 is not respecting my background colours on vertical header items

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 272 Views
  • 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
    bennyPerth
    wrote on last edited by
    #1

    Code using Qt 6.3.1 works correctly. No change to code and appears only the first setBackground vertical header respects the colour. The setForeground colours are correct and a tooltip for the object is also correct in 6.3.1 and 6.4.0. ![2_1664494875854_Qt6.4.0 output.jpg](Uploading 100%) ![1_1664494875854_Qt6.3.1 output.jpg](Uploading 100%) ![0_1664494875851_QtCode.jpg](Uploading 100%)

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Please provide a minimal, compilable example of your problem.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      0
      • B Offline
        B Offline
        bennyPerth
        wrote on last edited by bennyPerth
        #3

        I've created a small example as requested. Not sure how to input on Qt Forum so have uploaded a package to GitHub. https://github.com/bennyPerth/verticalHeaderProblem

        Think I've uploaded all the necessary files and there is also an image with the results am getting when changing my project from 6.3.1 to 6.4.0

        Have made a few changes to the source to highlight the setting of the foreground colour is always correct.

        The example displays 7 rows. There is a variable called maxRows that can be changed from 2 to 7 and the first and last row colour is always correct and the middle ones are wrong. If one then does a mouse down on a middle cell and hold it, the background colour is the correct one. If one then presses and holds another middle cell it has the same background colour as the first one pressed. Weird!

        No responce after three weeks so have altered my app to replace the vertical headers with push buttons. So my problem is effectively resolved.

        BTW the horizontal headers also have the same problem. Hadn't noticed because I only varied the foreground colour in them.

        Am changing from watching to ignoring.

        1 Reply Last reply
        0
        • B Offline
          B Offline
          bennyPerth
          wrote on last edited by
          #4

          code works again when using Qt 6.4.1

          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