View Single Post
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#23
Originally Posted by Venemo View Post
....how do I change the title of the dialog box which appears when I click on a QComboBox?
if you are using QT4.6 I suggest you use the QMaemo5ValueButton instead.
here's an example ( may not compile straightaway , but to give you an idea )
Code:
// the data model , which contains your list data
myListModel = new QStandardItemModel;

QStringList stringList;
stringList << "cat" << "dog" << "mouse";

foreach(QString string, stringList)
{
  QStandardItem *item = new QStandardItem(string);
  item->setTextAlignment(Qt::AlignCenter); // the Maemo 5 design spec recommends this.
  item->setEditable(false); // prevent editing of the item
  myListModel->appendRow(item);

}

// the list you see for selection
mySelectorList = new QMaemo5ListPickSelector;
mySelectorList->setModel(myListModel);

// the button itself
mySelector= new QMaemo5ValueButton("ANIMALS");
mySelector->setPickSelector(mySelectorList);

mySelector.show()
trust me this is easier than changing that title for a combobox, and will also look better for maemo
__________________
Developer of :
Buddy - budget/expense manager ( website )
Showtime - a telly channel listing viewer/reminder ( website )
Travelapp - london underground status/planner ( website )
Batlevel - desktop widget for battery level ( website )

“I hear and I forget. I see and I remember. I do and I understand.”

Last edited by krk969; 2010-03-24 at 23:07.
 

The Following User Says Thank You to krk969 For This Useful Post: