On Wednesday 08 February 2006 2:59 pm, Chad Brantly wrote:
> Phil Thompson wrote:
> > On Wednesday 08 February 2006 4:57 am, Chad Brantly wrote:
> >>Chad Brantly wrote:
> >>>Phil Thompson wrote:
> >>>>Mailing list is fine - but send the ui file you are using. Also, first
> >>>>check that pyuic behaves differently to uic - otherwise it's not a bug
> >>>>and won't get changed.
> >>>
> >>>Hi Phil,
> >>>
> >>>Thanks for responding. I don't know anything about C or uic, so I can't
> >>>really tell you if uic behaves differently. I will have to take the
> >>>word of Andreas on that one.
> >>>
> >>>I made a simplified .ui file that illustrates the problem I am
> >>>discussing and the corresponding .py file created with pyuic. In the
> >>>.ui file I named the layout grid in question 'inner_grid', but this name
> >>>is not preserved in the .py file. From what I can tell, this behavior
> >>>mimics uic. However, in the attached form1.py file, shouldn't
> >>>'group_boxLayout' be 'self.group_boxLayout'? If it was I would be able
> >>>to add or change items in the grid later on in my python code.
> >>>
> >>>I apologize for my ignorance of C. I guess that it speaks to the power
> >>>and simplicity of python that someone like me with no programming
> >>>background can do the things I am able to do with it. PyQt and pyuic
> >>>make a great package. Thank you for all of the work you have done on
> >>>this project, and thank you for your help with this issue.
> >>>
> >>>-Chad
> >>>
> >>>------------------------------------------------------------------------
> >>>
> >>>Form1 Form1 0 0 400 224 Form1 main_grid group_box group_box inner_grid
> >>>textEdit2 textEdit1
> >>>
> >>>
> >>>------------------------------------------------------------------------
> >>>
> >>># -*- coding: utf-8 -*-
> >>>
> >>># Form implementation generated from reading ui file 'form1.ui'
> >>>#
> >>># Created: Sat Feb 4 00:22:45 2006
> >>># by: The PyQt User Interface Compiler (pyuic) 3.14.1
> >>>#
> >>># WARNING! All changes made in this file will be lost!
> >>>
> >>>
> >>>import sys
> >>>from qt import *
> >>>
> >>>
> >>>class Form1(QMainWindow):
> >>> def __init__(self,parent = None,name = None,fl = 0):
> >>> QMainWindow.__init__(self,parent,name,fl)
> >>> self.statusBar()
> >>>
> >>> if not name:
> >>> self.setName("Form1")
> >>>
> >>>
> >>> self.setCentralWidget(QWidget(self,"qt_central_widget"))
> >>> Form1Layout =
> >>>QGridLayout(self.centralWidget(),1,1,11,6,"Form1Layout")
> >>>
> >>> self.group_box = QGroupBox(self.centralWidget(),"group_box")
> >>> self.group_box.setColumnLayout(0,Qt.Vertical)
> >>> self.group_box.layout().setSpacing(6)
> >>> self.group_box.layout().setMargin(11)
> >>> group_boxLayout = QGridLayout(self.group_box.layout())
> >>> group_boxLayout.setAlignment(Qt.AlignTop)
> >>>
> >>> self.textEdit2 = QTextEdit(self.group_box,"textEdit2")
> >>>
> >>> group_boxLayout.addWidget(self.textEdit2,0,1)
> >>>
> >>> self.textEdit1 = QTextEdit(self.group_box,"textEdit1")
> >>>
> >>> group_boxLayout.addWidget(self.textEdit1,0,0)
> >>>
> >>> Form1Layout.addWidget(self.group_box,0,0)
> >>>
> >>>
> >>>
> >>> self.languageChange()
> >>>
> >>> self.resize(QSize(400,224).expandedTo(self.minimumSizeHint()))
> >>> self.clearWState(Qt.WState_Polished)
> >>>
> >>>
> >>> def languageChange(self):
> >>> self.setCaption(self.__tr("Form1"))
> >>> self.group_box.setTitle(self.__tr("group_box"))
> >>>
> >>>
> >>> def __tr(self,s,c = None):
> >>> return qApp.translate("Form1",s,c)
> >>>
> >>>if __name__ == "__main__":
> >>> a = QApplication(sys.argv)
> >>> QObject.connect(a,SIGNAL("lastWindowClosed()"),a,SLOT("quit()"))
> >>> w = Form1()
> >>> a.setMainWidget(w)
> >>> w.show()
> >>> a.exec_loop()
> >>
> >>Phil,
> >>
> >>Can you tell me if this is the intended behavior or not? I have a
> >>workaround for now, but I just wanted to check for future reference.
> >
> > It is intended behaviour. pyuic has never directly exposed the layouts.
> > PyQt v3.15 improved the conversion code so that the correct layout class
> > was returned when you walked the tree of objects, so that method should
> > be reliable.
> >
> > Phil
>> So should I access it with self.group_box.layout().layout() or something
> like that? Right now I am using self.group_box.layout().children()[0]
> but this would only work in the case of one child, right?
Whatever makes most sense - pick an approach that will be the most resilient
to changes in the form's design.
Phil
More information about the PyQt
mailing list
‘She has never mentioned her father to me. Was he—well, the sort of man whom the County Club would not have blackballed?’ "We walked by the side of our teams or behind the wagons, we slept on the ground at night, we did our own cooking, we washed our knives by sticking them into the ground rapidly a few times, and we washed our plates with sand and wisps of grass. When we stopped, we arranged our wagons in a circle, and thus formed a 'corral,' or yard, where we drove our oxen to yoke them up. And the corral was often very useful as a fort, or camp, for defending ourselves against the Indians. Do you see that little hollow down there?" he asked, pointing to a depression in the ground a short distance to the right of the train. "Well, in that hollow our wagon-train was kept three days and nights by the Indians. Three days and nights they stayed around, and made several attacks. Two of our men were killed and three were wounded by their arrows, and others had narrow escapes. One arrow hit me on the throat, but I was saved by the knot of my neckerchief, and the point only tore the skin a little. Since that time I have always had a fondness for large neckties. I don't know how many of the Indians we killed, as they carried off their dead and wounded, to save them from being scalped. Next to getting the scalps of their enemies, the most important thing with the Indians is to save their own. We had several fights during our journey, but that one was the worst. Once a little party of us were surrounded in a small 'wallow,' and had a tough time to defend ourselves successfully. Luckily for us, the Indians had no fire-arms then, and their bows and arrows were no match for our rifles. Nowadays they are well armed, but there are[Pg 41] not so many of them, and they are not inclined to trouble the railway trains. They used to do a great deal of mischief in the old times, and many a poor fellow has been killed by them." As dusk came on nearly the whole population of Maastricht, with all their temporary guests, formed an endless procession and went to invoke God's mercy by the Virgin Mary's intercession. They went to Our Lady's Church, in which stands the miraculous statue of Sancta Maria Stella Maris. The procession filled all the principal streets and squares of the town. I took my stand at the corner of the Vrijthof, where all marched past me, men, women, and children, all praying aloud, with loud voices beseeching: "Our Lady, Star of the Sea, pray for us ... pray for us ... pray for us ...!" It had not occurred to her for some hours after Mrs. Campbell had told her of Landor's death that she was free now to give herself to Cairness. She had gasped, indeed, when she did remember it, and had put the thought away, angrily and self-reproachfully. But it returned now, and she felt that she might cling to it. She had been grateful, and she had been faithful, too.[Pg 286] She remembered only that Landor had been kind to her, and forgot that for the last two years she had borne with much harsh coldness, and with a sort of contempt which she felt in her unanalyzing mind to have been entirely unmerited. Gradually she raised herself until she sat quite erect by the side of the mound, the old exultation of her half-wild girlhood shining in her face as she planned the future, which only a few minutes before had seemed so hopeless. After he had gloated over Sergeant Ramsey, Shorty got his men into the road ready to start. Si placed himself in front of the squad and deliberately loaded his musket in their sight. Shorty took his place in the rear, and gave out: The groups about each gun thinned out, as the shrieking fragments of shell mowed down man after man, but the rapidity of the fire did not slacken in the least. One of the Lieutenants turned and motioned with his saber to the riders seated on their horses in the line of limbers under the cover of the slope. One rider sprang from each team and ran up to take the place of men who had fallen. "As long as there's men and women in the world, the men 'ull be top and the women bottom." Then, in the house, the little girls were useful. Mrs. Backfield was not so energetic as she used to be. She had never been a robust woman, and though her husband's care had kept her well and strong, her frame was not equal to Reuben's demands; after fourteen years' hard labour, she suffered from rheumatism, which though seldom acute, was inclined to make her stiff and slow. It was here that Caro and Tilly came in, and Reuben began to appreciate his girls. After all, girls were needed in a house—and as for young men and marriage, their father could easily see that such follies did not spoil their usefulness or take them from him. Caro and Tilly helped their grandmother in all sorts of ways—they dusted, they watched pots, they shelled peas and peeled potatoes, they darned house-linen, they could even make a bed between them. HoME一级毛片视频免费公开
ENTER NUMBET 0018www.cynvenio.com.cn www.68868.com.cn www.zybahai.com.cn www.qin-yun.com.cn www.bxlt854.com.cn ttxcx.com.cn jnjsqc.com.cn kpee.com.cn dcbus.com.cn www.majime.com.cn