Results 1 to 4 of 4

Thread: How to avoid border of QCanvas

  1. #1
    Join Date
    Aug 2010
    Posts
    12
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default How to avoid border of QCanvas

    Hi folks,

    i have a QCanvas and some observing QCanvasView's. Using Qt3.3.8.

    The problem is that if the QCanvas is smaller than the QCanvasView visible area, there is a 1px border painted around the QCanvas. This border seems to be an uninitialized area which is painted in randomly colors.

    I tried changing background colors in any combination of QCanvas and QCanvasView. I can't get rid of this poor border

    A hint would be much much much appreciated.

    Thanks
    olzzen

    Sorry for my bad english.

  2. #2
    Join Date
    Aug 2010
    Posts
    12
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: How to avoid border of QCanvas

    Nobody here who has encountered and solved the explained problem?

  3. #3
    Join Date
    Aug 2010
    Posts
    12
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: How to avoid border of QCanvas

    Hi again,

    i've tried the Q3Canvas and Q3CanvasView support classes from Qt4.6.2 and the problem doesn't appear. Don't know which version of the Qt3 sources is used in these support classes.

    It's a pity that nobody has a solution yet. Is seems to me that the described problem is a BUG in the Qt3 sources.

    Perhaps there is at least one who can confirm this?!

    greetz

  4. #4
    Join Date
    Aug 2010
    Posts
    12
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: How to avoid border of QCanvas

    Ok, did a workaround...

    In the QCanvasView::drawContents function a rect is drawn in the size of the QCanvas area with the appropriate background color.

Similar Threads

  1. Replies: 2
    Last Post: 21st March 2012, 14:30
  2. QCanvas Example
    By Sarma in forum Qt Programming
    Replies: 3
    Last Post: 8th March 2010, 20:44
  3. QCanvas in widget
    By prasenjit in forum Newbie
    Replies: 6
    Last Post: 8th December 2009, 10:42
  4. save Qcanvas
    By doss in forum Newbie
    Replies: 2
    Last Post: 12th May 2009, 05:41
  5. QCanvas Examples
    By Kapil in forum Qt Programming
    Replies: 6
    Last Post: 23rd March 2006, 13:12

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.