Results 1 to 3 of 3

Thread: Merging to different QBrushPattern?

  1. #1
    Join Date
    Aug 2007
    Location
    Gorakhpur, India
    Posts
    254
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Merging to different QBrushPattern?

    Dear All!
    Is it possible to merge different QBrushPattern?
    If Yes!, How a way we can merge to different QBrush pattern in a single one?
    I want to merge Qt::SolidPattern with Qt::CrossPattern.

    If No! Any alternate way to acheive the output.
    Anurag Shukla
    A man who never makes mistake is the man who never does anything! Theodre Rosvelt!

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Merging to different QBrushPattern?

    One simple way would be to draw twice... one with the first pattern, and second with the second pattern

    else you can use the different constructors of QBrush to create brush from images.
    Refer QBrush::QBrush ( const QPixmap & pixmap ) , QBrush::QBrush ( const QImage & image )
    Hope this helps

  3. #3
    Join Date
    Aug 2007
    Location
    Gorakhpur, India
    Posts
    254
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Merging to different QBrushPattern?

    One simple way would be to draw twice... one with the first pattern, and second with the second pattern
    No, It is not well for me because when we set the second pattern the first one pattern is removed; however I have need both of them.
    QBrush::QBrush ( const QPixmap & pixmap ) , QBrush::QBrush ( const QImage & image )
    Hope this helps
    And the second way consume to much memory according to my need. So, It is not helpful for me. Suppose I have a need of red Horizontal pattern with Blue (or different) base (background) colours. So By the use of image, I would create a horizontal pattern image with different colours. It is a tedious job.
    So that, I am wanting to merge QBrush pattern or wanting to create own pattern with two colours without using texture pattern.
    Anurag Shukla
    A man who never makes mistake is the man who never does anything! Theodre Rosvelt!

Similar Threads

  1. Menubar Merging
    By elcuco in forum Qt Programming
    Replies: 3
    Last Post: 7th April 2007, 15:54

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.