-     painter. setRenderHints(QPainter::Antialiasing)- ; 
-     const QPalette& pal = palette(); 
-     float thickline = 1.5;//_sizes.thicker_line(); 
-     float border_rad = thickline * 4.0; 
-     float w = width(); 
-     float h = height(); 
-     mask_img.fill(0xff);        
-     mask_ptr. drawRoundedRect( QRectF( 0- ,  0- , w, h )- ,        
-                                   border_rad+thickline/2.0, 
-                                   border_rad+thickline/2.0 ); 
-   
-         setMask( bmp ); 
-   
-         border_pen.setWidthF(thickline); 
-         border_pen.setJoinStyle(Qt::RoundJoin); 
-         painter.setPen(border_pen); 
-                                 thickline/2.0, 
-                                 w-thickline, 
-                                 h-thickline ); 
-   
-         painter.setBrush(bg_brush); 
-   
-         painter.setOpacity(0);   <-----------------------------------HERE IS THE PROBLEMATIC CODE 
-         mask_ptr.setOpacity(0); 
-   
-         mask_ptr. drawRoundedRect( QRectF( 0- ,  0- , w, h )- ,        
-                                   border_rad+thickline/2.0, 
-                                   border_rad+thickline/2.0 ); 
-   
-         painter.drawRoundedRect( bg_rect, 
-                                  border_rad, 
-                                  border_rad ); 
        QPainter painter(this);
    painter.setRenderHints(QPainter::Antialiasing);
    const QPalette& pal = palette();
    float thickline = 1.5;//_sizes.thicker_line();
    float border_rad = thickline * 4.0;
    float w = width();
    float h = height();
    QImage mask_img(width(), height(), QImage::Format_Mono);       
    mask_img.fill(0xff);       
    QPainter mask_ptr(&mask_img);       
    mask_ptr.drawRoundedRect( QRectF( 0, 0, w, h),       
                                  border_rad+thickline/2.0,
                                  border_rad+thickline/2.0 );
   QBitmap bmp = QBitmap::fromImage(mask_img);       
        setMask( bmp );
        
        QBrush bg_brush( pal.color(QPalette::Active, QPalette::Window) );
        QPen border_pen( pal.color(QPalette::Active, QPalette::Dark) );
        border_pen.setWidthF(thickline);
        border_pen.setJoinStyle(Qt::RoundJoin);
        painter.setPen(border_pen);
        QRectF bg_rect = QRectF( thickline/2.0,
                                thickline/2.0,
                                w-thickline,
                                h-thickline );
       
        painter.setBrush(bg_brush);
        painter.setOpacity(0);   <-----------------------------------HERE IS THE PROBLEMATIC CODE
        mask_ptr.setOpacity(0);
      
        mask_ptr.drawRoundedRect( QRectF( 0, 0, w, h),       
                                  border_rad+thickline/2.0,
                                  border_rad+thickline/2.0 );
        painter.drawRoundedRect( bg_rect,
                                 border_rad,
                                 border_rad );
To copy to clipboard, switch view to plain text mode 
  
				
Bookmarks