![]() |
2010-03-01
, 11:58
|
|
Posts: 754 |
Thanked: 630 times |
Joined on Sep 2009
@ London
|
#2
|
If I comment out the "setPickSelector" call the button doesn't do anything when clicked but at least it doesn't crash. This makes me think it has to be something to do with QMaemo5ListPickSelector.
A google for QMaemo5ListPickSelector and pyside brings up only a git commit log.
Is there a chance this just doesn't work yet or am I doing something stupid? This is my first python project in about 4 years and my first time using QT so perhaps it's pebkac.
Any help would be greatly appreciated.
QStandardItemModel *stationListModel = new QStandardItemModel(0, 1); foreach(QString station, stationList) { QStandardItem *item = new QStandardItem(station); // the Maemo 5 design spec recommends this. item->setTextAlignment(Qt::AlignCenter); item->setEditable(false); // prevent editing of the item stationListModel->appendRow(item); } QMaemo5ListPickSelector *fromSelector = new QMaemo5ListPickSelector; QMaemo5ListPickSelector *toSelector = new QMaemo5ListPickSelector; QMaemo5ListPickSelector *viaSelector = new QMaemo5ListPickSelector; fromSelector->setModel(stationListModel); toSelector->setModel(stationListModel); viaSelector->setModel(stationListModel); // not setting the current index means that the value is empty. fromButton->setPickSelector(fromSelector); toButton->setPickSelector(toSelector); viaButton->setPickSelector(viaSelector);
![]() |
2010-03-02
, 10:31
|
Posts: 99 |
Thanked: 75 times |
Joined on Nov 2009
|
#3
|
![]() |
2010-03-02
, 10:40
|
|
Posts: 754 |
Thanked: 630 times |
Joined on Sep 2009
@ London
|
#4
|
So far not had any luck.
I asked a few times on the pyside irc channel but didn't get any response.
Will try on their mailing lists next to see if that helps.
Quite a pain, will have to try and use something else in the short term so I can at least continue coding the project.
![]() |
2010-03-02
, 12:48
|
Posts: 53 |
Thanked: 90 times |
Joined on Nov 2009
@ Manaus, Brazil
|
#5
|
![]() |
2010-03-02
, 13:03
|
Posts: 99 |
Thanked: 75 times |
Joined on Nov 2009
|
#6
|
I decided to use Python and QT for this. However I've come across a problem I've not been able to solve.
Because there are a number of stations in the UK I wanted to have a the QT equivalent of the hildon PickerButton that give you a button which, when pressed, presents a list of options. You also have the ability to type into a text box to take you to the option you want.
I started searching for the QT version and came across this post:
http://qt.nokia.com/doc/qt-maemo-4.6...kselector.html
So I tried to implement this in python. The first problem I came across was that PyQT didn't seem to support the QtMaemo5 module so I switched to pyside.
This ran fine up until I clicked the button and then the app seg faults.
The code I'm using to try and create this is:
A google for QMaemo5ListPickSelector and pyside brings up only a git commit log.
Is there a chance this just doesn't work yet or am I doing something stupid? This is my first python project in about 4 years and my first time using QT so perhaps it's pebkac.
Any help would be greatly appreciated.