<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
span.EmailStyle18
        {mso-style-type:personal-compose;
        font-family:"Arial","sans-serif";
        color:purple;
        font-weight:normal;
        font-style:normal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:177886940;
        mso-list-type:hybrid;
        mso-list-template-ids:-164082340 134807567 134807577 134807579 134807567 134807577 134807579 134807567 134807577 134807579;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1
        {mso-list-id:584534651;
        mso-list-type:hybrid;
        mso-list-template-ids:970484534 134807567 134807577 134807579 134807567 134807577 134807579 134807567 134807577 134807579;}
@list l1:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'>I am not sure whether anyone has found this problem before, however I can’t find it in the archives on Gmane.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'>I first came across this problem when I designed a table in QT Designer, and set fonts on certain cells. But when I ran the code, no formatting. Looking at the code generated by pyuic I could not see the code I would expect to set the fonts.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'>So, I generated a test UI file in Designer with all properties on the table widget, the vertical and horizontal titles and cells themselves (attached)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'>And then I ran the compiler and looked at the code (attached) and found the following things missing:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'>QTableWidget:<o:p></o:p></span></b></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo2'><![if !supportLists]><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'><span style='mso-list:Ignore'>1.<span style='font:7.0pt "Times New Roman"'>     </span></span></span><![endif]><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'>.font.Kerning not compiled.<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo2'><![if !supportLists]><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'><span style='mso-list:Ignore'>2.<span style='font:7.0pt "Times New Roman"'>     </span></span></span><![endif]><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'>.font.Antialiasing not compiled<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo2'><![if !supportLists]><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'><span style='mso-list:Ignore'>3.<span style='font:7.0pt "Times New Roman"'>     </span></span></span><![endif]><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'>.QTableView.sortingEnabled is placed in reTranslateUI – however this does not seem to be concerned with internationalisation and I feel should be in the main code (though I could easily be wrong here)<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo2'><![if !supportLists]><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'><span style='mso-list:Ignore'>4.<span style='font:7.0pt "Times New Roman"'>     </span></span></span><![endif]><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'>.QTableWidget.rowCount & .columnCount – if these are specified explicitly in QT Designer then they appear twice in the .py file. (Of course this won’t cause major problems, but is nevertheless inappropriate.)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'>QTableWidgetItem<o:p></o:p></span></b></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l1 level1 lfo4'><![if !supportLists]><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'><span style='mso-list:Ignore'>1.<span style='font:7.0pt "Times New Roman"'>     </span></span></span><![endif]><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'>Horizontal and Vertical header tooltips, whatsthis, fonts, textalign, background and foreground are not compiled at all.<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l1 level1 lfo4'><![if !supportLists]><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'><span style='mso-list:Ignore'>2.<span style='font:7.0pt "Times New Roman"'>     </span></span></span><![endif]><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'>Cell tooltips, whatsthis, fonts and textalign are not compiled at all.<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l1 level1 lfo4'><![if !supportLists]><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'><span style='mso-list:Ignore'>3.<span style='font:7.0pt "Times New Roman"'>     </span></span></span><![endif]><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'>Cell background and foreground are compiled, however sequence of statements is wrong – sets brush twice, then assigns second definition to both background and foreground.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'>Whilst we are looking at this code, it would also be helpful if we were to leave a blank line between code for QTableWidget, Horizontal Headers, Vertical Headers and Cells.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'>Note: I am using python2.7.2 32-bit, and PyQt4.8.4-1 binary PyQt-Py2.7-x86-gpl-4.8.4-1.exe.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'>P.S. I am trying to look at the uiparser.py and properties.py part of the Pyqt4 uic compiler to see if I can work out how to fix this – but as yet I have failed to understand the code well enough to work it out.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:purple'>Rgds, P<o:p></o:p></span></p></div></body></html>