Is possible to easily set the background color of a widget by changing the palette of widget itself. The code is very easy as follow:


MyWidget->setAutoFillBackground(true);

// We set a white background color for this example
QPalette FramePalette(MyWidget->palette());
FramePalette.setColor(QPalette::Background, Qt::white);
MyWidget->setPalette(FramePalette);

Please note that for have our custom backgound color showed is need to set the setAutoFillBackground flag to true as the example.
QTableWidget is the Qt widget that, as the name suggest, show a table composed by cells able to contain both native field like text or icon and also more complex widgets like listbox, checkbox and so on. Usually for Qt list widgets the method clear() remove all the rows currently showed in the control. However, also if present, this call doesn't work for QTableWidget control. If you want to remove all the rows from QTableWidget you need to simply set the number of rows to zero as follow:

MyTable->setRowCount(0);

This will have same effect of clear() and remove all rows.

In case your Android project consist in a lot of source files you should, normally, add one by one to the LOCAL_SRC_FILES label and this could be a very boring task to complete. Fortunately there is the possibility to make addition of multiple files using wildcards in a very easy way. Let's go to see how to make it.



Eclipse IDE have some specific repositories containing various extensions, plugins and so on. Usually Eclipse is able to download and install all these components by directly accessing to Internet Some problem can happen if your network need a proxy access. Here a short guide on how to configure proxy access into Eclipse.


In case of use Qt for Windows development the problem of the icon showed as window system icon is automatically resolved by add the .ico file as Windows resource. Windows already allow such feature and no need of additional efforts. In case of same code ported and compiled under Linux or Mac this step is not automatic. However, basically, what you need is to simply manually assign by code your icon to the window. If you are moving from Windows application project add your .ico file to the Qt resource file (.qrc) of your project and, once done, add this line in window initialization phase:

QApplication::setWindowIcon(QIcon(":/my_prefix_if_any/my_window_icon.ico"));