Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [SOLVED] Symbian^3 and QGraphicsScene

[SOLVED] Symbian^3 and QGraphicsScene

Scheduled Pinned Locked Moved Mobile and Embedded
2 Posts 1 Posters 1.6k 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.
  • T Offline
    T Offline
    tony
    wrote on last edited by
    #1

    Hi,

    I've a problem with QGraphicsScene, when used on Symbian^3.

    Maybe some of you already know that I'm developing homescreen widgets (I posted about that some weeks ago), and they're working fine.

    I just use a QPixmap with a fixed size, that I convert to a Symbian bitmap and I render it to a homescreen widget using SDK APIs.

    If I paint directly in my source QPixmap, everything works perfectly, transparency is ok.

    But if I have a QGraphicsScene, I put some QGraphicsWidgets inside, and then I render QGraphicsScene on the source QPixmap, transparency fails (sometimes is black, sometimes it grabs background from a bitmap that I don't know about).

    What surprises me a lot is that, if I render a rect that's outside QRect(0,0,312,82) (312x82 is the size of a homescreen widget), plus some offset due to the fact that homescreen widget is horizontally narrower than screen, transparency works again.

    It seems that QGraphicsScene, when created, inits its background to something that should not be, and there's no way to clear it. I tried a "clear", "setBackground(Qt::transparent)", "invalidate" ... nothing.

    Of course I can work outside such "dead zone", but after a while transparency gets broken even there.

    How can I force QGraphicsScene to restore its background anytime I use it?

    Thanks,
    Antonio.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tony
      wrote on last edited by
      #2

      Hi,

      found the issue. QGraphicsProxyWidget containing a QLabel needs QLabel to have a transparent background, before placing it in scene. So a setStyleSheet("background-color: transparent") fixed the problem.

      Antonio.

      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