Results 1 to 3 of 3

Thread: QBrush pattern problem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2006
    Posts
    1
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question QBrush pattern problem

    When window size is changed by using QPainter:: setWindow(...)
    during a zooming process, the behaviour of brush pattern is very
    wierd (please look at the attached bmp). Is there any way to make
    the brush pattern stable?

    //Painting codes:

    void paint_test:: paintEvent(QPaintEvent * e)
    {
    QPainter painter(this);
    painter.setPen(Qt::red);

    QBrush brush(Qt:: Dense6Pattern);
    brush.setColor(Qt::blue);
    painter.setBrush(brush);

    painter.setWindow(0, 0, 1000, 1000);
    painter.drawRect(50, 50, 100, 200);

    painter.setWindow(0, 0, 2000, 2000);
    painter.drawRect(500, 100, 200, 400);

    painter.setWindow(0, 0, 3000, 3000);
    painter.drawRect(1350, 150, 300, 600);

    painter.setWindow(0, 0, 4000, 4000);
    painter.drawRect(2600, 200, 400, 800);

    painter.setWindow(0, 0, 5000, 5000);
    painter.drawRect(4250, 250, 500, 1000);
    }
    Attached Images Attached Images

Similar Threads

  1. QTimer problem ... it runs but never triggs
    By yellowmat in forum Newbie
    Replies: 4
    Last Post: 4th July 2006, 12:54
  2. Grid Layout Problem
    By Seema Rao in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2006, 12:45
  3. Problem with bitBlt
    By yellowmat in forum Newbie
    Replies: 1
    Last Post: 5th April 2006, 14:08
  4. fftw problem
    By lordy in forum General Programming
    Replies: 1
    Last Post: 16th March 2006, 21:36
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

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.