![]() |
Many questions
Yesterday I did get alot of stuff working for my new program wich made me bit excited as this is my first Qt program. I did reach a point where almost everything worked but I got some problem on the way there. The first is how I update a xml file with new elements and update attributes in a element. I use DOM since I heard it is the best for doing manipulations. And here is my code for making the xml:
Code:
int XML::saveNewEx(QString &name, QString &group, QString &muscle, QString &info)A link wich describe this using the dbus, but I do not understand this thing... http://talk.maemo.org/showthread.php...ia+player+dbus The third problem I have is rotation of the screen. I got it working by seting the attribute to portrait or almost... When I add a new exercise I want to write the name and such so I thought that landscape would be much better here. When I create the landscape-window I set the attribute to landscape(for that window). But it does not work, and as I also have set the attribute(portrait) for every window and remove the first windows attribute only some becomes portrait and yet I have not figured out how this really work. So where do I have the set this argument? Do I have to do something before? Or not do? And the last problem is about vibration! And here is the code for it: Code:
interface = new QDBusInterface(MCE_SERVICE, MCE_REQUEST_PATH,Code for the timer to call vibrate and stopVibrate Code:
vibrate(); |
Re: Many questions
Solved the xml part!
|
Re: Many questions
Quote:
I assume that you're trying to trigger a single shot timer here. "tmr->setSingleShot(true);" would be the right choice in that case. Or you could use the static method "QTimer::singleShot(5000, this, SLOT(stopVibrate()));" |
Re: Many questions
Great, now two out of four problems solved. Soon this should be ready for testing :)
|
Re: Many questions
I just realised that when I dont have any attributes (portrait) on the mainwindow and I open a new window (with attribute) it is still in landscape. But when I open a new window from the second window (with attribute, same as the last window) it goes into portrait mode. And when I go back from the third window to the second it rotates so it is also in portrait.
To get the second window in portrait mode I could also open or close the keyboard when in the second window... |
Re: Many questions
not that great in programming but maybe you should check when the program is checking when it's in portrait mode or not and when the accelerometres are activited and is it before or after the window opens
|
Re: Many questions
Did not really understand what you ment I guess but I dont use the accelerometer do to the rotation this is a portrait-program with only one window in landscape(this one needs text-input). From what I have read you should set this attribute when the window is created wich I do and it works for one window but not the other with the same code :S
|
Re: Many questions
Still have the same old problems, but I got a new problem. How do I interact with the calendar? I know of the calendar-backend-dev example but the development guide tells me to install calendar-backend (wich I have the newest version of) and calendar-backend-dev(wich does not exist). So my thoughts are that this is removed with qt 4.6. If it is, is there any new examples or so for the new calendar api?
|
Re: Many questions
Hi,
Quote:
Daniel |
Re: Many questions
Hmm, strange. I am using the new nokia qt sdk with the device(pr 1.2 installed)... When I type in #include <CCalender.h> it tells me that I do not have the file.
|
| All times are GMT. The time now is 12:49. |
vBulletin® Version 3.8.8