Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Closed] Problem with paint event in mac?
QtWS25 Last Chance

[Closed] Problem with paint event in mac?

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pratik041
    wrote on last edited by
    #1

    I have tried the following program in both windows and mac. In windows it is working fine but in mac while moving the focus from one Qlineedit to other. in some portion around qlineedit the painting is missing.
    @bool ofi_vc_gui_panel::eventFilter (QObject *obj, QEvent *event)
    {
    // Check for the paint event.
    if (event->type () == QEvent::Paint) {

        QPainter paint(window); // Create a paint object.
    
        // Store the source rect of the image.
        QRect source = QRect(0, 0, dlg_data.cx, dlg_data.cy);
    
        // Store the target rect where image is to be drawn.
        QRect target = QRect(0, 0, dlg_data.cx, dlg_data.cy);
    
        // Draw the image.
        paint.drawPixmap (target, pixmap, source);
    
        // Return the status.
        return true;
    }
    

    }
    @
    Here i am painting on parent window containing qlineedit as a child.
    For image see the link below login window image
    http://www.imgplace.com/viewimg221/4369/95paint.png
    The white color around the qlineedit corresponding to emilid is the problem.

    Pratik Agrawal

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      You are discussing the same issue already in another "topic":http://developer.qt.nokia.com/forums/viewthread/12896/. I think you have been warned before not to open duplicate topics.

      I am closing this topic.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved