Results 1 to 9 of 9

Thread: Two different methods of using QBrush with QPainter - why is only one working?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2011
    Posts
    11
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default Re: Two different methods of using QBrush with QPainter - why is only one working?

    Thanks for your advice. I adapted the code according to your remarks, but I still need the call inside the timerEvent() method, otherwise the widget won't get updated.


    EDIT: i finally got it. Thie problem was not the update() call but the way I called the setValue()-method.

    I tried to call setValue() with ++_value or --_value. This of course manipulates _value directly before calling the method with the same new _value.

    But my setValue() method begins with a check if the given integer parameter is different to the actual _value (because I want to emit a valueChanged() signal from that method). Of course, this will never be true, because of the direct manipulation of _value with ++ and --.

    Anyway, thanks for you help!
    Last edited by EMKAH; 19th May 2013 at 15:21. Reason: found the solution by myself

  2. The following user says thank you to EMKAH for this useful post:


Similar Threads

  1. QBrush pattern problem
    By ilovethisgame in forum Qt Programming
    Replies: 2
    Last Post: 4th October 2012, 22:07
  2. QPainter.drawImage() not working with resource image file
    By thiagoalencar22 in forum Qt Programming
    Replies: 4
    Last Post: 22nd April 2010, 21:07
  3. matrix for QBrush
    By navi1084 in forum Qt Programming
    Replies: 5
    Last Post: 5th February 2010, 11:27
  4. Is there any API to set QBrush instance as Cosmetic
    By navi1084 in forum Qt Programming
    Replies: 6
    Last Post: 3rd February 2010, 03:47
  5. QBrush pixmap tiling
    By rbp in forum Qt Programming
    Replies: 6
    Last Post: 19th June 2008, 12:54

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.