Archived:Tips and Tricks - Qt Programming
Template:Archived Template:ArticleMetaData
Preconditions[edit | edit source]
- Download and install the Qt SDK
Qt release installation issues and solutions[edit | edit source]
Here are some of the solutions to the problems faced.
The list at present is short but if there are similar experiences which other have a solution for one can add to the list. Following is the list of Errors and their resolution-
Qt not configured properly[edit | edit source]
- If your system date and time is not set correctly then it is possible that your Qt installation is not completed properly. So before you start installation check your system date and time.
Carbide unable to detect SDK[edit | edit source]
If your carbide is unable to detect the SDK's then their is a problem with Devices.xml were you have to insert all the system path of SDK's manually.
Note, on Using Nokia SDKs and Tools on Windows Vista environment variables (including Path) are not updated until you reset the PC. So ensure you reset after setting the path to the \bin directory
Configure Your Carbide.c++[edit | edit source]
Before running all the Qt command ensure that your carbid enviroment variable should be set properly.For setting this variable Start->All Progrrams->carbid c++ ->configure winscw enviroment
Sdk Not Found in carbide when creating Qt application from template[edit | edit source]
Check have you extracted the libraries as given in the instructions. It can be found over here Qt install path C:\Qt\ This package contains all the binaries and libraries and headers required to integrate Qt as part of sdk.
If the sdk is not found while running SDK then please have a look at the device.xml where all the Device edition are listed here if your SDK version is not shown then you hav to add the device manually
Emulator Option not shown[edit | edit source]
This will happen, if you forgot to build Qt for emulator. You should do bldmake bldfiles abld build winscw udeb after extracting qtlibs .exe
Screen Resolution not correct on 3.1 Device. Your application runs out of bounds when created from Template.[edit | edit source]
Check the settings for the default window. There is nothing wrong in your setup. The Templates are not stable yet. So some manipulation is required.
Unable to close Qt application.[edit | edit source]
Just press Red key on your phone and the application would be closed.
Unable to find custom slot created in my class, when using Signal/Slot dialog box. How do I use the custom slot in such a scenario?[edit | edit source]
Probably you need to work a way around this. Edit "MyApplication.cpp"(Name of Application in this case is MyApplication. Add your signal slot call in constructor of your MyApplication Class function. And there you go :)
for Eg:
GUIWidget.h[edit | edit source]
class GUIWidget : public QWidget
{
Q_OBJECT
public slots:
void plusClicked();
....
....
};
GUIWidget.cpp[edit | edit source]
GUIWidget::GUIWidget(QWidget *parent): QWidget(parent)
{
ui.setupUi(this);
QObject::connect(ui.pushButton1, SIGNAL(clicked()), this, SLOT(plusClicked()));
}
NOTE: "pushButton1" is the button created using GUI toolbox(Qt C++ Widget Box).
New Signal/slot information is not reflected (after new interaction is added using Signal/Slot dialog Box) to the class is not reflected in ui_MyApplication.h, when seen in Carbide.[edit | edit source]
Just close the MyApplication.ui (after addition of new Signal/Slot information in Signal/Slot Dialog Box )and open ui_MyApplication.h. It should now work for you. You can verify the changes simultaneously by opening the ui_MyApplication.h file in some other editor.
How to Change UID of the application[edit | edit source]
Edit .pro file of the application.
How do I add new src paths and files[edit | edit source]
Edit the .pro file of the application.
Common errors and their resolution could also be found here