![]() |
Re: I'm learning with Qt and I have a question
Quote:
I'll post the solution here, in case anyone else wants it. It bugs me though, that it can't be done without creating a derived class. Code:
#ifndef UNCLOSEABLEMESSAGEBOX_H |
Re: I'm learning with Qt and I have a question
Quote:
However, if you have a crappy signal and slot implementation (slow, preprocessor-based, no real namespace support, no compile-time checks, no flexible parameter binding, only QSignalMapper or private slots) then you try everything to get around it, at least when performance and correctness is important. Well, and turns out that this actually *is* important if you write frameworks or libraries. That's why you have this seemingly arbitrary separation between signals and events in Qt, even though it makes no sense to the application developer (which would almost always prepare a signal over an event, simply because it is easier to use and more flexible). You'll soon get used to the Qt mantra of deriving custom classes for every little feature though (I am not saying that this is a good habit). |
Re: I'm learning with Qt and I have a question
Mikhas, you seem to know much about Qt.
Could you please view this thread? It would be great if you could say something about that issue. :) |
Re: I'm learning with Qt and I have a question
I only had a brief look at the example, it probably crashes because something else is closing your QDialog before you get to handle the dialog's response. But just looking at the code is not as helpful as simply running it through the debugger. So if you turn the code snippet into a compiling testcase (which still reproduces the crash) then I can help you.
|
Re: I'm learning with Qt and I have a question
Quote:
|
Re: I'm learning with Qt and I have a question
Hello :)
guys im very very new to qt and development stuff so you got to excuse me... ok so i have maemo SDK, scratchbox, and qt SDk installed on my ubuntu lucid ( 10.04 ) i created in qt-creator a hello-world app and it's directory contains : -/qml/hellowrld/main.qml -/qmlapplicationviewer/ --qmlapplicationviewer.cpp --qmlapplicationviewer.h --qmlapplicationviewer.pri -helloworld.desktop -helloworld.pro.user -main.cpp -helloworld.png -helloworld.pro -helloworld.svg what steps i should do to compile that source and result a binary that i could send it to my N900 and run it :) would really appreciate a short step by step guide :) ./sifo |
Re: I'm learning with Qt and I have a question
Quote:
(At least, this is how I'm doing it. I haven't updated my SDK in almost a year though, so things might have changed a bit.) Once you've got the toolchain, you should be able to set up Maemo 5 as one of the targets for your project. (There's a "Projects" icon on the left side of my Qt Creator window that allows you to edit project targets.) There's a scratchbox environment you can use to simulate a N900 for testing purposes, and a wizard to simplify installing apps onto a real N900. You can also just copy a binary on to your device and run it directly, if you prefer. Probably the best resource for me is the Qt Maemo/Meego Support Page, which contains links to most of the Maemo-related documentation on their website. So yeah, nothing extremely quick and easy to get you started, but once you've got all the bits and pieces in place, it's easy to build binaries and get them on to your device. :) |
Re: I'm learning with Qt and I have a question
Here's some pages I bookmarked in Firefox from when I setup my environment a couple of months ago.
http://wiki.maemo.org/Documentation/...-based_systems http://wiki.maemo.org/Documentation/...own_the_SDK_UI http://talk.maemo.org/showthread.php?t=68684&page=2 Qt "Build" will create files that are upload-able to extras. This makes a source.changes, dsc and tar files for the autobuilder. To create armel debs I move the files to scratchbox MyDocs directory and run in scratchbox armel targets... Code:
dpkg-buildpackage -rfakeroot -saI install the armel.deb to my N900 to test. If the package works OK, I upload the file created by Qt "build" to autobuilder. Remember if using this method to change your compat file to 5 as 7 will not work in scratchbox. |
Re: I'm learning with Qt and I have a question
I usually prefer using madde, makes my life easier, and works as well.
Just install madde on N900, add maemo toolchain from the QtSDK update tool, go to options -> linux devices -> device configuration on QtCreator and let the wizard guide you. |
Re: I'm learning with Qt and I have a question
Thank you all for your replies
And here come the story :D how can i copy stuff from / to scratchbox (MyDocs) ? ./sifo |
Re: I'm learning with Qt and I have a question
Quote:
Code:
cp <files> /scratchbox/users/<username>/home/<username>/MyDocsCode:
sudo mount --bind <directory> /scratchbox/users/<username>/home/<username>/MyDocs/mydirI prefer to use the second approach when working with Qt Creator and scratchbox, as there is then no need to copy files. I write code in Qt Creator, then compile in scratchbox. :) |
Re: I'm learning with Qt and I have a question
Thank you marxian that helped a lot ( silly me )
|
Re: I'm learning with Qt and I have a question
1 Attachment(s)
the qt-sdk version i have is 1.1.2 i downloaded this old as i expected to have maemo target ( which was not in 1.2.1 ) and i only have now the desktop and qt simulator targets !
so when i go to the SDKMaintenanceTool i get an error as in the screenshot ! please help ( im thinking about moving to learn python or Gtk+, do you recommend that ? ) Thanks |
Re: I'm learning with Qt and I have a question
1 Attachment(s)
You should be able to add the Maemo5 toolchain to the latest version of the SDK. No need to install an earlier version. However, as a (possible) fix, I have attached the files from my 'Licences' folder. Place these in your ~/QtSDK/Licences folder (create the folder if it does not already exist).
|
Re: I'm learning with Qt and I have a question
that directory is already there, but i overwrite with your files and still the same error :(
but hold on ! im in a blocked country ! is this what causing the whole problem ? Much appreciated ./sifo |
Re: I'm learning with Qt and I have a question
Quote:
|
Re: I'm learning with Qt and I have a question
No but i have multiple qt-creator versions, one from the SDK and one from ubuntu repos, im going now to remove what i dont need :)
Thanks |
Re: I'm learning with Qt and I have a question
still the same error :(
im thinking about reinstalling the sdk, but i cant find it in the "installed apps" in application manager, shuold i use rm -r ? thanks |
Re: I'm learning with Qt and I have a question
Quote:
|
Re: I'm learning with Qt and I have a question
So i gave up making Tor working on my ubuntu ( i need it to access the sdk repo ),
Finally i got ride of it on my Windows 7 by using hot spot shield, Downloading now Maemo tool-chain, i hope it will work fine :) thank you all ./sifo Edit : i failed downloading it :mad: i got "data corrupted error" will try reinstalling the whole sdk as i played too much with it. |
Re: I'm learning with Qt and I have a question
Yeah, I'm having a little trouble with the Fremantle toolchain, too.
I've just installed Nokia Qt SDK 1.2 on Debian Wheezy and have one main thing preventing completion of the setup: I cannot get the Fremantle Toolchain to register with Qt Creator, despite downloading the entire SDK. - How can the toolchain be recognised with Qt Creator, so software can be built for Fremantle, not just Harmattan? - Do I need to install the Fremantle SDK as well? Also, what's up with the version numbers? The Maintenance Tool claims it's creating a Fremantle toolchain for Qt 4.7.0, then the folder that's actually created is labelled 4.6.2 - doesn't the device running Qt 4.7.5? Any ideas or assistance that might help resolve the problem described, would much appreciated. |
Re: I'm learning with Qt and I have a question
I just installed the toolchain with the SDK maintenance tool and it worked. You may need to find qmake by hand on the toolchains tab if that didn't work.
I don't know what is it with the versions, I had this concern myself. N900 runs 4.6.3 IIRC on PR1.3 but CSSU provides 4.7.4 |
Re: I'm learning with Qt and I have a question
Quote:
Code:
/opt/QtSDK/Maemo/4.6.2/targets/fremantle-pr13/bin/qmake |
Re: I'm learning with Qt and I have a question
1 Attachment(s)
Thanks for the helpful comments.
Not sure what I've done wrong. Below is a screen shot of the Tools > Options > Build & Run menu. Everything appears to be in order, looking through the directories. However, Qt Creator cannot detect qmake in the Maemo folder, even when trying to select it manually! Is there a command line instruction to associate it? The toolchain is installed, apparently... Code:
user@PC:~$ ls ~/QtSDK/Maemo/4.6.2/targets/fremantle-pr13/bin/Code:
user@PC:~$ cat ~/QtSDK/Maemo/4.6.2/targets/fremantle-pr13/information Code:
user@PC:~$ ls ~/QtSDK/Maemo/4.6.2/sysroots/ | grep fremantleIf anyone know's of a one-liner do assist I'd be very grateful - something with this, perhaps? Code:
for item in `cat toolchain.files | awk '{print $2}'`; do ... |
Re: I'm learning with Qt and I have a question
1 Attachment(s)
Quote:
Here's a screenshot of my Qt, I can't remember doing any really special apart from following the text based scratchbox installer wiki and adding the qmake location. All of my stuff is installed in /opt not /home but that shouldn't matter. |
Re: I'm learning with Qt and I have a question
Check if qmake is executable
|
| All times are GMT. The time now is 22:33. |
vBulletin® Version 3.8.8