Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16131 (Git)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: 3129ae4296e40ed20e7b3d460b86e6969acbe1c3
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Australia (en_AU)
Hi guys,
getting into Qt Creator....
I have done a layout in Creator. I then populate part of it from a macro.
Code: Select all
for doco in FreeCAD.listDocuments():
if not self.DC.nameIsActive("doco", doco):
continue
fromDocoName = QtGui.QLabel(doco)
font = fromDocoName.font()
font.setPointSize(10)
font.setWeight(100)
font.setStyle(QtGui.QFont.StyleItalic)
fromDocoName.setFont(font)
toDocoName = QtGui.QLabel(doco)
toDocoName.setFont(fromDocoName.font())
addDoco = True
sheetList = FreeCAD.getDocument(doco).findObjects()
for sheet in sheetList:
sheetName = sheet.Label
if not self.DC.nameIsActive("sheet", sheetName):
continue
if addDoco == True:
self.form.sheetsFrom.addWidget(fromDocoName, x)
self.form.sheetsTo.addWidget(toDocoName, x)
addDoco = False
fromRB = QtGui.QRadioButton(sheetName)
fromRB.accessibleName = doco
fromRB.clicked.connect(self.fromButtonClicked)
self.form.sheetsFrom.addWidget(fromRB, x)
self.DC.fromSheetsGroup.addButton(fromRB)
toRB = QtGui.QRadioButton(sheetName)
toRB.accessibleName = doco
toRB.clicked.connect(self.toButtonClicked)
self.form.sheetsTo.addWidget(toRB, x)
self.DC.toSheetsGroup.addButton(toRB)
The problem is, I am losing some of the layout from creator. Well, possibly not losing it, but it is not visible. Also, how to eliminate the excessive spacing. I believe this is all controlled from the Creator file, and possible overwritten in the macro.
But am at a loss what is needed.
Sorry for the, probably trivial, questions.
Cheers,
Gary.