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. QWidget has transparent background-color setting display incorrectly under win8.x
Forum Updated to NodeBB v4.3 + New Features

QWidget has transparent background-color setting display incorrectly under win8.x

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

    Hi,

    My friends are working a project with Qt5.x.

    Our program has a main window, then we use code below to create a NewTab on main window
    main window has load a picture as background, and we want the NewTab has a transparent background color so we can see background picture of main window.

    @NewTab::NewTab(QWidget *parent) :
    QTextEdit(parent)
    {
    setReadOnly(true);
    setStyleSheet("background-color:transparent"); //to set a transparent background color
    }@

    These code above works fine when our build running under win xp/vista/7/mac osx 10.7.x~10.9.x
    But when our build running under win8.x, the NewTab is not transparent but fully white.
    If we run our build under win8.x with a compatibility mode of win xp, the NewTab will keep transparent. but that is inconvinient for users.

    This problem appears when we start use Qt5.2.x
    and we tried Qt5.3 few days before, and this problem still bothered us.
    Any good ideas with this problem?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Sounds like it could be a bug. You should have a look at "the bug report system":http://bugreports.qt-project.org to see if it's something known. If not, please consider opening a new report providing a simple compilable example that reproduce the behavior.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      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