Is your code one large block in main?
No, my main function is little. There was include : setting Locale, parser of command line and constructor of my-super-special-class.
Or did you organize your code into logical files with corresponding headers?
My code is organized into files *.h, *.cpp, *.ui, *.qrc.
QT can call into your libraries.
Yes. my-super-special-class is intended for: Load dll, start GUI and working with it.
You should not store QObject* derived objects in stl containers.
I think this is not true. Below you can see proof-code.
|
Source code
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#include <QFileDialog>
#include <QApplication>
const QString stShWarning = QString::fromUtf8("background-color: rgb(255, 255, 127);") ;
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QFileDialog *pFD = new QFileDialog();
QList<QWidget *> allWidget = pFD->findChildren<QWidget *>();
std::list<QWidget *> dbgList;
foreach(QWidget * pwgt, allWidget )
{
dbgList.push_back(pwgt);// filling stl-container
}
foreach(QWidget * pwgt,dbgList)
{
pwgt->setStyleSheet(stShWarning);// using stl-container
}
return pFD->exec();
}
|