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. Background position in pixels
Qt 6.11 is out! See what's new in the release blog

Background position in pixels

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

    Can someone please confirm that in Qt Stylsheets we can use xpos ypos.

    background-position in pixels so we have only one image and use sprites like we do in websites.

    Currently in Qt documentation they have mentioned:

    http://doc.qt.nokia.com/4.2/stylesheet.html

    background-position:

    top
    | bottom
    | left
    | right
    | center

    and not x and y coordinates.

    1 Reply Last reply
    0
    • ? This user is from outside of this forum
      ? This user is from outside of this forum
      Guest
      wrote on last edited by
      #2

      I chked the sources and looks like Qt webkit has code to recognize background-position x and y values.
      see: webkit/webcore/css/CSSParser.cpp

      Normal widgets only support alignment ..
      see: gui/text/qcssparser.cpp

      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