Originally Posted by
hickscorp
Wysota,
i saw this, but the problem is, the dialog i'm talking about is constructing the layout in from the .ui, and i dont know how to access (get a ptr) to the layout object to do the size constraint...
From my code (A class which herits from the generated CPP), maybe i can use findChildren<QVerticalLayout*> which theorically will return only one item in list (Since there is only one layout over my whole QDialog)?
The thing is, i have ideas, but i'm not sure if it's "clean" and bug free...
Thank you a lot for pointing this article anyway
findChildren is bug free ... this is a super access function ... i have generated Ui file direct
from db (self build on qt generate qtui, latex pdf forms, scribus forms phyton, && xml) and i have construct a class container to take db->fieldname qt->objektname db->data .... and i fill form from two table on 0.344 sec..
lineedit = editperson->findChildren<QLineEdit *>();
boxlist = editperson->findChildren<QComboBox *>();
doubnum = editperson->findChildren<QDoubleSpinBox *>();
numerlist = editperson->findChildren<QSpinBox *>();
datelist = editperson->findChildren<QDateTimeEdit *>();
/* table a start fill */
for (int i=0;i<lineedit.size();i++){
basedata->FillText(lineedit[i]);
}
for (int i=0;i<numerlist.size();i++) {
basedata->FillNumer(numerlist[i]);
}
for (int i=0;i<boxlist.size();i++) {
basedata->FillBox(boxlist[i]);
}
for (int i=0;i<datelist.size();i++) {
basedata->FillDate(datelist[i]);
}
/* table a stop */
next table from his id...
lineedit = editperson->findChildren<QLineEdit *>();
boxlist = editperson->findChildren<QComboBox *>();
doubnum = editperson->findChildren<QDoubleSpinBox *>();
numerlist = editperson->findChildren<QSpinBox *>();
datelist = editperson->findChildren<QDateTimeEdit *>();
/* table a start fill */
for (int i=0;i<lineedit.size();i++){
basedata->FillText(lineedit[i]);
}
for (int i=0;i<numerlist.size();i++) {
basedata->FillNumer(numerlist[i]);
}
for (int i=0;i<boxlist.size();i++) {
basedata->FillBox(boxlist[i]);
}
for (int i=0;i<datelist.size();i++) {
basedata->FillDate(datelist[i]);
}
/* table a stop */
next table from his id...
To copy to clipboard, switch view to plain text mode
Bookmarks