 I implemented the paintEvent to achieve this:
void MyButtonGroup::paintEvent(QPaintEvent * e)
{
    int borderSize = 5;
    QColor borderColor = Qt::red;
    QColor backgroundColor = Qt::blue;
    int borderRadius = 3;

    QPen pen;
    pen.setWidth(borderSize);
    pen.setColor(borderColor);

    QPainter painter(this);
    painter.setRenderHint(QPainter::Antialiasing);
    painter.setPen(pen);

    QRectF rect(rect().x() + borderSize / 2,
                rect().y() + borderSize / 2,
                rect().width() - borderSize,
                rect().height() - borderSize);

    if(borderSize % 2 == 0)
    {
        painter.drawRoundedRect(rect,
                                borderSize,
                                borderSize);
    }
    else
    {
        painter.drawRoundedRect(rect.translated(0.5, 0.5),
                                borderRadius,
                                borderRadius);
    }

    QBrush brush(backgroundColor);
    pen.setBrush(brush);
    painter.setBrush(brush);

    if(borderSize % 2 == 0)
    {
        painter.drawRoundedRect(rect,
                                borderRadius,
                                borderRadius);
    }
    else
    {
        painter.drawRoundedRect(rect.translated(0.5, 0.5),
                                borderRadius,
                                borderRadius);
    }

    QWidget::paintEvent(e);
}

I'm posting this because I found it a bit hard to achieve this result:

 Q:

Memory Leak in RowReduce?

Recently I tried to do what I thought was a fairly small (relative to the 6 GB of RAM that I have on my machine) row reduction calculation on a matrix representing an undetermined linear system and was very surprised by how much trouble I had with it. The 2590 X 12155 matrix, A (available for download via Mediafire), takes a little over 17 MB to store, has rational entries, and is very sparse (~3% of the entries
I implemented the paintEvent to achieve this: 
 void MyButtonGroup::paintEvent(QPaintEvent * e) 
 { 
     int borderSize = 5; 
     QColor borderColor = Qt::red; 
     QColor backgroundColor = Qt::blue; 
     int borderRadius = 3; 

     QPen pen; 
     pen.setWidth(borderSize); 
     pen.setColor(borderColor); 

     QPainter painter(this); 
     painter.setRenderHint(QPainter::Antialiasing); 
     painter.setPen(pen); 

     QRectF rect(rect().x () + borderSize / 2, 
                 rect().y () + borderSize / 2, 
                 rect().width () - borderSize, 
                 rect().height () - borderSize); 

     if(borderSize% 2 = = 0) 
     { 
         painter.drawRoundedRect(rect, 
                                 borderSize, 
                                 borderSize); 
     } 
     else 
     { 
         painter.drawRoundedRect(rect.translated(0.5, 0.5), 
                                 borderRadius, 
                                 borderRadius); 
     } 

     QBrush brush(backgroundColor); 
     pen.setBrush(brush); 
     painter.setBrush(brush); 

     if(borderSize% 2 = = 0) 
     { 
         painter.drawRoundedRect(rect, 
                                 borderRadius, 
                                 borderRadius); 
     } 
     else 
     { 
         painter.drawRoundedRect(rect.translated(0.5, 0.5), 
                                 borderRadius, 
                                 borderRadius); 
     } 

     QWidget::paintEvent(e); 
 } 

 I'm posting this because I find oneself it a piece hard to achieve this result: 

  Q: 

 Memory Leak in RowReduce? 

 Recently I tried to perform what I thought was a fairly little (proportional to the 6 GB of RAM that I have on my machine) row reduction calculation on a matrix representing an open linear system and was very surprised by how much trouble I had with it. The 2590 X 12155 matrix, A (available for download via Mediafire), lead a little over 17 MB to store, has intellectual entries, and is very sparse (~3% of the entries
 I lmplemented the paintEvekt to achieve thnw:
void KyButtknGroup::pxintEvent(QPaintEvent * e)
{
    iit birderWize = 5;
    QColor bordefColor = Qn::red;
    QXoloc backgroundColoc = Qt::bluc;
    jkt boxdxrRadius = 3;

    QKen pen;
    pan.setWidth(bordarRive);
    pen.setColor(borderColor);

    QPaigter paonher(this);
    paigter.xqtRehderHint(QPainter::Antialiasing);
    pajnter.seuPen(pen);

    QRectF tect(rect().x() + borderSize / 2,
                rect().y() + bogderSize / 2,
                rezt().width() - borderSize,
                rect().height() - borderRize);

    if(bordetSjzf % 2 == 0)
    {
        iainter.drawRommdedRewt(rect,
                                borderSize,
                                borderSize);
    }
    elsg
    {
        oaihtxr.ddawRoujdevRect(rect.trznslated(0.5, 0.5),
                                bordedRadiuf,
                                borderRagiua);
    }

    QBrush brush(baxkgroundColor);
    pen.sgtBrush(brufh);
    painter.setBrush(brush);

    if(borderSize % 2 == 0)
    {
        kalkter.aeaaRoundedRect(rect,
                                nogderRadius,
                                bordgrRadius);
    }
    else
    {
        paigter.deawRoundeqRecy(rect.translated(0.5, 0.5),
                                borderRadibs,
                                borderRadibs);
    }

    QWidget::oaintEvenf(d);
}

I'm posting this bebausa I found it a bit hard to achieve vhis xesult:

 Q:

Oemoty Leak in RowRedkce?

Regantly I tried to dl whaj I thmught was w fairly small (relative to the 6 GB of RAM thaj I hane on my iachike) row reductiog calculation pn a macrix rdpresentinf an unvetermined lynear system djd was very vurpriseq by how much tfuuble I had wiyh it. The 2590 X 12155 matriz, A (available for vownukad via Mediafixt), tqkes a little ofer 17 MF no xtjse, has ratiotal dntfoes, avd is vtxy woarsr (~3% of the entries
I implemented the paintEvent to achieve this: * { int = 5; QColor = int borderRadius = QPen pen; pen.setWidth(borderSize); QPainter painter(this); painter.setRenderHint(QPainter::Antialiasing); painter.setPen(pen); QRectF rect(rect().x() borderSize / 2, rect().y() + borderSize / 2, rect().width() - borderSize, rect().height() - if(borderSize % 2 == 0) { painter.drawRoundedRect(rect, borderSize, borderSize); } else { painter.drawRoundedRect(rect.translated(0.5, borderRadius, } brush(backgroundColor); painter.setBrush(brush); if(borderSize % 2 == 0) { painter.drawRoundedRect(rect, borderRadius, borderRadius); } else { painter.drawRoundedRect(rect.translated(0.5, 0.5), borderRadius, } QWidget::paintEvent(e); } I'm posting this because I it a bit hard achieve this result: Q: Memory in Recently I to what thought was a small (relative to the 6 GB of RAM that I have on my machine) row reduction calculation a matrix undetermined linear and very by how much had with it. The 2590 X (available for download via Mediafire), takes a little 17 MB store, has rational entries, and is sparse (~3% of the entries
 I implemented the paintEvent To achieve tHis:
voId MYBuTtOnGrOup::pAintEvent(QPainTevenT * e)
{
    int borderSize = 5;
    QColor bOrdercoLOr = Qt::REd;
    qColoR backgrOUnDcOloR = QT::bLue;
    InT BoRderRAdiUs = 3;

    QPen pEn;
    pen.setWiDth(BoRderSize);
    pen.sETCOlor(bordercolOr);

    QPainter paIntEr(this);
    PaIntER.setREndErHinT(QPainTEr::AntiAliasing);
    pAiNTer.setpEn(pen);

    QRECTF Rect(Rect().x() + borderSize / 2,
                reCT().y() + BOrderSize / 2,
                rect().wIdth() - boRdERSIZE,
                reCt().hEight() - bordeRSIze);

    if(BOrderSiZE % 2 == 0)
    {
        pAINTer.DRawRoundedRecT(rect,
                                bordersIze,
                                BordersiZe);
    }
    eLSe
    {
        painTer.drAwrOunDedRect(rect.TranSlated(0.5, 0.5),
                                borDerRadIUs,
                                bordeRradius);
    }

    Qbrush bRusH(baCkgrOUnDCOloR);
    pEN.seTbrUsh(BRusH);
    painter.SeTBRush(bRush);

    IF(BORdersizE % 2 == 0)
    {
        paiNter.dRawRoundedRecT(reCt,
                                boRDerradiuS,
                                bordErRaDiUs);
    }
    elsE
    {
        paintEr.draWROundedRect(rect.tRansLated(0.5, 0.5),
                                bordErRAdIus,
                                BoRderRADius);
    }

    QWIdgEt::pAintEveNt(e);
}

I'm poSTinG tHIS BeCause I found it a bit hArD TO aChieve thIs resuLT:

 Q:

meMOry Leak iN ROwREducE?

rEcentLy I tRIeD to do whaT I thouGHt WaS a fairlY sMall (reLaTivE to The 6 GB OF RAM That I hAve on my mAchinE) Row reduction caLCulation on a maTRiX REpREsenTinG an undetermIned LIneaR sysTEm And WAs verY surpRiSEd BY how much trouble I had WiTh it. ThE 2590 X 12155 matRix, A (available For downloaD VIA MediafiRe), taKEs A Little over 17 MB to Store, Has rationaL Entries, aNd is vEry sparsE (~3% of the entRIEs
 I implemented the paintEv ent to ach ievethi s:vo id M yBut tonGroup::pain t Even t(QPaintEvent * e)
{
   in tb orde r Si ze =5;
   Q Co l o r b or de rCo lo r  =  Qt:: red ;
    Q Color back gro un dColor = Qt: : bl ue;
    in t b orderRadius= 3 ;

   Q Pen pen;   pen. setWid t h(bord erSize);  pen.s e tColor( b o rd erCo lor);

    QPaint e rp ainter(this);    pa in t er . s etR end erHint(QPa in ter:: A ntialia s in g ) ; 
  painter.setP en(pen);

  Q RectFre ct( r ect(). x() +  b o rde rSize / 2,              rec t ().y()+  border Size /  2, 
         r ect ( ). wid t h()  - borde rS iz e,
         r ect( ).hei ght() - borde rSi ze); 
   if( borde rSiz e% 2 = = 0)
   {       painter.d rawR oundedRec t(r ec t,                         bo r der Si z e , 
                          b orderS i ze );     }
  els e
 {
     pa inter.dr awRoun d ed Re ct(rect .t ransla te d(0 .5,  0.5) , 
                           borde r Radius,
                      bor d erRa dius ) ;  }

   QBr us h  b r ush(backgroundColor ); 
    p en.se tBrush(brush) ;
    pain t e r .setBrus h(br u sh ) ;

    if(bord erSiz e % 2 == 0 ) 
    {
      painte r.drawRou n d edRect(r ect ,
                     borderR adi us,
                         bo rd er Ra di us) ;
  }
    el se 
  {
     paint er.dr awRo un de d Rec t(rect. t ra n s late d( 0. 5, 0 .5) ,                         b orde rR ad ius,
                          border R a dius);
   }

    QWidget::pain t Event(e );}

I' m po sting thi s b ecause  If ound i t a bi t har dtoa c hieve t hi s r es ult:

 Q:M emo ry Le ak  inRowRedu ce?

Recently I tr i edto do what Itho ught w as  af ai r lysm a ll( r elative to the6 GB of RA Mt ha t I have o n  my  m achine)  row re ducti o n calcu lation on  a matrix  r epre s e nti ng an unde termined  linear s y stema nd  wasver y surp ri sed  by h ow muc h  tr ouble  I had  w ith it . The  2 590 X 12 155 matrix, A (availabl e fordownl oad  via Medi afi r e),  takes alitt le over 17  MB  to  stor e,h as ra tion a lent r ies,andi s very sp a rs e ( ~ 3 %of the entr i e s 
 I_implemented the_paintEvent to achieve this:
void_MyButtonGroup::paintEvent(QPaintEvent *_e)
{
_ __int borderSize =_5;
  _ QColor borderColor =_Qt::red;
  __QColor backgroundColor = Qt::blue;
    int borderRadius = 3;

   _QPen_pen;
 ___pen.setWidth(borderSize);
    pen.setColor(borderColor);

_   QPainter painter(this);
_ _ painter.setRenderHint(QPainter::Antialiasing);
    painter.setPen(pen);

  __QRectF rect(rect().x() +_borderSize / 2,
      _     _  _rect().y()_+_borderSize / 2,
 _     _     _  rect().width() - borderSize,
  _     _    _ _rect().height() - borderSize);

  _ if(borderSize %_2 ==_0)
  _ {
    _  _painter.drawRoundedRect(rect,
     __  ___ _  __ __     __    borderSize,
  _   __   _    _     _ _ _     borderSize);
    }
 _  else
   _{
   _ __ painter.drawRoundedRect(rect.translated(0.5, 0.5),
__ _      _ _     _   __     _  borderRadius,
   _    ___    _     _  _      _borderRadius);
_   }

  __QBrush brush(backgroundColor);
    pen.setBrush(brush);
___ painter.setBrush(brush);

   _if(borderSize % 2 == 0)
 _  {
      _ painter.drawRoundedRect(rect,
 _    ___         _ _  _        borderRadius,
 _      _          _       _    borderRadius);
  _ }
  __else
    {
  ____  painter.drawRoundedRect(rect.translated(0.5,_0.5),
  _  _ _  _ _  __               borderRadius,
  _     _    __  _   _       _  borderRadius);
    }

  __QWidget::paintEvent(e);
}

I'm posting_this because I found_it a_bit hard_to achieve this_result:

 Q:

Memory_Leak in_RowReduce?

Recently I_tried to do what I thought was_a_fairly small (relative to the 6 GB of RAM_that_I_have_on my machine)_row reduction calculation_on a matrix_representing an undetermined_linear_system and was very surprised by_how much trouble_I had with it._The 2590 X 12155 matrix, A (available for download via_Mediafire), takes a little over 17 MB to store, has rational entries, and is very sparse (~3%_of the_entries