Results 1 to 3 of 3

Thread: QBrush TexturePattern alignment

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2006
    Posts
    142
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    8
    Thanked 1 Time in 1 Post

    Default QBrush TexturePattern alignment

    Hello,
    I create a QBrush with a TexturePattern and set a pixmap like this:
    Qt Code:
    1. QPixmap pm("eye.png");
    2. this->brush = QBrush(pm);
    3. QRect r(100, 100, pm.width(), pm.height());
    4. painter.fillRect(r, this->brush);
    To copy to clipboard, switch view to plain text mode 
    The results is below, ie the image left corner is in the (about) middle of the QRect, so what did I miss?
    Attached Images Attached Images

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.