[mythtv] mythmusic patch - trivial

Bruce Markey bjm at lvcm.com
Sun Apr 6 16:13:39 EDT 2003


Matt Zimmerman wrote:
> On Sun, Apr 06, 2003 at 05:35:21PM -0400, Matt Zimmerman wrote:
> 
> 
>>>     for(digits=1,by10=10;(max/by10) >=1 ;by10*=10,digits++);
>>>-    sprintf(temp,"%%0%ii",digits);
>>>+    QString temp(QString().sprintf("%%0%ii",digits));
>>>     for(int x=0;x<max;x++)
>>>     {
>>>         litem=listlist.at(playlistorder[x]);
>>>-        litem->setText(0,QString().sprintf(temp,x));
>>>+        litem->setText(0,QString().sprintf(temp.ascii(),x));
>>>     }
>>
> 
> Now that I think about it, isn't there some way to set the
> alignment/justification of the columns in these things?
> 

QString::leftJustify and rightJustify can fill or truncate
to a specified width.

http://doc.trolltech.com/3.1/qstring.html#leftJustify

--  bjm



More information about the mythtv-dev mailing list