Results 1 to 7 of 7

Thread: Chech if filled

  1. #1
    Join Date
    Oct 2012
    Location
    Türkiye
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Chech if filled

    Hi,, I wanted to ask if there is any way we can check wether a shape(using QPainter) is filled or not

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Chech if filled

    You mean after it was painted?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Oct 2012
    Location
    Türkiye
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Chech if filled

    Yes after it is painted,, or maybe there is something we can do before hand which will allow us to find out...

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Chech if filled

    What exactly do you need it for?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Oct 2012
    Location
    Türkiye
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Chech if filled

    I am trying to remake a grid of squares i saw where we can fill and unfill the squares by clicking on them,,, I manages to fill them by using a pressMouseEvent. The box fills up when the left mouse button is pressed within the square, The X-Y starting point of the grid and the width of the squares is known. I use x() and y() to get where the LMB was clicked, find out in which square I am and drawFill a box overthere; I know that even an unfilled box is actually filled with default color. I wanted to know if can change the color back to default after clicking again on the box,, or I have completely redesign the function? and if I do, is there a commonly used method to do it

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Chech if filled

    Quote Originally Posted by Kamran Kawish View Post
    I am trying to remake a grid of squares i saw where we can fill and unfill the squares by clicking on them
    In that case hold a data structure (e.g. an array) for the grid that denotes whether a particular cell is filled or not.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    Oct 2012
    Location
    Türkiye
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Chech if filled

    hmmmm I was thinking about it,,, was wondering it mouse event could help over there,,,,, thankyou very much

Similar Threads

  1. Replies: 1
    Last Post: 30th October 2009, 20:02
  2. Performance with many filled polygons on screen
    By lni in forum Qt Programming
    Replies: 10
    Last Post: 14th September 2009, 10:53
  3. How to get QGraphicsRectItem filled color
    By wisconxing in forum Qt Programming
    Replies: 1
    Last Post: 3rd February 2009, 02:28
  4. How to get QGraphicsItem's filled color
    By wisconxing in forum Newbie
    Replies: 1
    Last Post: 2nd February 2009, 14:48
  5. How to draw a filled round rect?
    By high_flyer in forum Qt Programming
    Replies: 8
    Last Post: 11th May 2006, 10:26

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.