Active Topics

 


Reply
Thread Tools
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#21
Originally Posted by Venemo View Post
Thanks!
IT WORKS!

Now it is nice that this works from code, but is there any way in the UI designer to do this?
sorry Im old school, dont use the UI designer, prefer building my app brick by brick
Im sure there is, I will try it in the UI designer when I have sometime and let you know if you somebody else doesnt reply.
__________________
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 19:17.
 

The Following User Says Thank You to krk969 For This Useful Post:
Venemo's Avatar
Posts: 1,296 | Thanked: 1,773 times | Joined on Aug 2009 @ Budapest, Hungary
#22
Thanks!

I tried it but if I remove the caption, the menu won't appear. However, your solution suits my needs, so it is enough.

By the way, how do I change the title of the dialog box which appears when I click on a QComboBox?
 
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:
Venemo's Avatar
Posts: 1,296 | Thanked: 1,773 times | Joined on Aug 2009 @ Budapest, Hungary
#24
Actually, MADDE doesn't support Qt 4.6 yet, so I'm using 4.5...
 
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#25
http://labs.trolltech.com/blogs/2010...so-on-windows/

besides AFAIK QT4.5 is already history. You will see it completely gone in a few days.
PR1.2 SDK is out which has QT4.6 by default, even the autobuilder is now supporting QT4.6.
__________________
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.”
 

The Following User Says Thank You to krk969 For This Useful Post:
Venemo's Avatar
Posts: 1,296 | Thanked: 1,773 times | Joined on Aug 2009 @ Budapest, Hungary
#26
Very nice, thank you!
I will check it out soon. However, the name "QMaemo5ValueButton" doesn't suggest too much portability to me.
 
Posts: 42 | Thanked: 27 times | Joined on Dec 2009 @ Espoo, Finland
#27
Is there a way of having the "old style" menu still in QT 4.6? Porting some applications is very tricky when all normal menuitems are translated into hildon menuitems automatically (very many items in the list --> unusable).

So is there an easy way to prevent this:
 
Posts: 118 | Thanked: 45 times | Joined on Dec 2009 @ Germany
#28
Originally Posted by Venemo View Post
Thanks!
IT WORKS!

Now it is nice that this works from code, but is there any way in the UI designer to do this?
(I mean the UI designer of Qt Creator for Windows. I use MADDE.)
Bringing up an old one.

I also use MADDE. In the Qt Designer you can add a menu bar to your main window by right clicking on it (in the "object/class window") and selecting menu bar. Then it will show up in the wysiwyg window. There you can change the "type here" to something valid and get your menu. In that "drop down" menu you, you have to fill in some names. If I take the examples above it would be "Action1" and "Action2".

The resulting action will be called like actionAction1 actionAction2, or so, which you than can use.

I hope this can be somehow understood (without graphics ^^).
 

The Following User Says Thank You to emesem For This Useful Post:
Venemo's Avatar
Posts: 1,296 | Thanked: 1,773 times | Joined on Aug 2009 @ Budapest, Hungary
#29
Originally Posted by labra View Post
Is there a way of having the "old style" menu still in QT 4.6? Porting some applications is very tricky when all normal menuitems are translated into hildon menuitems automatically (very many items in the list --> unusable).

So is there an easy way to prevent this
Yes, reduce the number if items in the menu.
Put the other functionality elsewhere - this is also required if you want your app to be finger-friendly, anyways.

Originally Posted by emesem View Post
Bringing up an old one.

I also use MADDE. In the Qt Designer you can add a menu bar to your main window by right clicking on it (in the "object/class window") and selecting menu bar. Then it will show up in the wysiwyg window. There you can change the "type here" to something valid and get your menu. In that "drop down" menu you, you have to fill in some names. If I take the examples above it would be "Action1" and "Action2".

The resulting action will be called like actionAction1 actionAction2, or so, which you than can use.

I hope this can be somehow understood (without graphics ^^).
Thanks!
Since then, I already discovered this. But it is nice from you to answer.
 
Halftux's Avatar
Posts: 868 | Thanked: 2,516 times | Joined on Feb 2012 @ Germany
#30
Does somebody know some code to open the menubar automatically?
Or a way to update and repaint an open menubar?

I could implement a qpushbutton into the menu which lets the menu open when pressed and it should change some actions from the menu. It all does what I want but the result can only be seen by closing and reopen the menu again. I also tried to update and repaint parent widgets with no success.
In qt desktop version it is working

[edit]: So it looks like that this menu belongs to the WM, so I had to make a workaround with X11.

Last edited by Halftux; 2016-12-02 at 23:07. Reason: answer
 
Reply


 
Forum Jump


All times are GMT. The time now is 13:01.