Reply
Thread Tools
Posts: 341 | Thanked: 57 times | Joined on Nov 2009
#1
Hey all .... I'm just hitting off with using Qt Creator to develop apps for my N900 using C++ ... I will use this thread to ask the issues which I face ..

My first question is: how can I know all the events that a specific control on a form supports ? (e.g. a button can support events such as clicks, hover over, etc ..) .. how do I get the full list of such events for each of the controls ?

What are 'private slots' and doesn't Qt Creator automatically create all the even function declarations for you in the header file ? I'm asking this because I saw a Qt Creator getting started tutorial, and in that all event function declarations and definitions were manually written in ..
 
Posts: 143 | Thanked: 99 times | Joined on Jun 2009 @ Houston
#2
Originally Posted by ahmadka View Post
My first question is: how can I know all the events that a specific control on a form supports ? (e.g. a button can support events such as clicks, hover over, etc ..) .. how do I get the full list of such events for each of the controls ?
The official documentation is your friend; http://doc.qt.nokia.com/4.6/index.html

also, if you right click on a control in a form and select "go to slots", you'll see all the signals that that control can emit,

What are 'private slots' and doesn't Qt Creator automatically create all the even function declarations for you in the header file ? I'm asking this because I saw a Qt Creator getting started tutorial, and in that all event function declarations and definitions were manually written in ..
If you use the designer all that will be taken care of automatically. However, this only works for the default controls. If you need to subclass some Qt widget and add new signals/slots you'll have to take care of those manually. It's not hard, actually... the above link has some nice tutorials.

Happy coding.
 

The Following User Says Thank You to tpaixao For This Useful Post:
Posts: 341 | Thanked: 57 times | Joined on Nov 2009
#3
Ok thanks ... Qt Creator is proving to me a little bit more difficult than I had thought, but anyways ...

Next Question: How can I configure Qt Creator to run applications on my Windows 7 64bit computer directly (not even through the Maemo emulator) ..?

Right now I have Qt Creator running apps directly on my N900, but I want to just have them run on my PC like any other application for the time being ..
 
Posts: 190 | Thanked: 129 times | Joined on Mar 2010 @ Bavaria, Germany
#4
Just install the Qt Desktop libraries from here. If you have Visual Studio 2008, use the VS2008 - otherwise the mingw version.
 

The Following User Says Thank You to gri For This Useful Post:
Posts: 341 | Thanked: 57 times | Joined on Nov 2009
#5
Ok thanks, but how do I do the configuration in Qt Creator that the applications should be built and run for and on my PC .. ?
 
Posts: 190 | Thanked: 129 times | Joined on Mar 2010 @ Bavaria, Germany
#6
Originally Posted by ahmadka View Post
Ok thanks, but how do I do the configuration in Qt Creator that the applications should be built and run for and on my PC .. ?
First add your desktop Qt installation in "extras -> settings -> Qt4".

After doing that change to the "Projects" tab on the left (not the one in Settings). There you'll see a funny box at the top with a "+". Click on it to add a target.
Target switching can be done by clicking on the mobile phone or computer icon at the bottom left of your QtCreator screen.
 

The Following 2 Users Say Thank You to gri For This Useful Post:
Posts: 341 | Thanked: 57 times | Joined on Nov 2009
#7
Ok I'm getting some errors here .. this is what I did ... I downloaded the minGW libraries, and then I started its install .. I was asked where to install the files, and I chose C:\Qt2\

I was also asked where is minGW installed .. I gave the C:\NokiaQtSDK\mingw\ directory ......... C:\NokiaQtSDK\ is where I had installed the Nokia Qt SDK BETA earlier on ..

I then went to Tools --> Options --> Qt4 in Qt Creator and clicked on the '+' button on the right, and indicated the C:\Qt2\qmake\qmake.exe path for the qmake file ..

Immediately, it said 'Qt version is not properly installed, please run make install' in the bottom section of this dialog box ...

I closed it all, and went to 'Projects' in the left pane, clicked on the '+' button, and selected Desktop.

The error reported here now is 'This Qt-Version is invalid', next to the 'Qt Version' list box (which has the newly added '4.6.2' entry)

Now when I try to build a project for the Desktop target, I get the following compiler error:

Qt version 4.6.2 is invalid. Set valid Qt Version in Tools/Options
Qt version is not properly installed, please run make install


Error while building project pixmap (target: Desktop)

When executing build step 'qmake'

Last edited by ahmadka; 2010-06-06 at 15:47.
 
Posts: 190 | Thanked: 129 times | Joined on Mar 2010 @ Bavaria, Germany
#8
Wherever you installed Qt, qmake is in "<QtDir>/bin/qmake.exe". If you choose one from another location this might fail.

If this was just a typo in the forums, reinstall the Qt desktop version and install it with its own mingw. (this should work I think. Sadly I'm using the visual studio compiler)
 

The Following User Says Thank You to gri For This Useful Post:
Posts: 341 | Thanked: 57 times | Joined on Nov 2009
#9
Thanks ! Okay that solved the first two errors ... However, I'm still getting the following error when I try to build or run:

Could not find make command: make in the build environment
Error while building project pixmap (target: Desktop)
When executing build step 'Make'


My settings are as follows:



 
Posts: 190 | Thanked: 129 times | Joined on Mar 2010 @ Bavaria, Germany
#10
If you see the message containing "An incompatible build exists", go to your project tree in "edit" mode, open the context menu and do a "run qmake" and then "rebuild all". If it still fails, disable the shadow build in the projects tab and do the first step again.

To ensure your Qt version works, rebuild the Qt debugging helpers for your desktop version in the settings. If the rebuild succeeds, the steps above should work.
 
Reply


 
Forum Jump


All times are GMT. The time now is 06:55.