You can call every page of a toolbox separately by calling ui->page_2->setblabla
but there is no option to setTitle of the page or something. So, how can I change the title of a page of the toolbox?![]()
You can call every page of a toolbox separately by calling ui->page_2->setblabla
but there is no option to setTitle of the page or something. So, how can I change the title of a page of the toolbox?![]()
When you 're trying to help somebody in the newbie section, don't forget that he is a newbie. Be specific and give examples.
*bump* *bump*
When you 're trying to help somebody in the newbie section, don't forget that he is a newbie. Be specific and give examples.
I found this in 5 seconds:
http://doc.qt.nokia.com/4.7/qtoolbox.html#setItemText
Thanks for the answer. Sorry for the bumping
When you 're trying to help somebody in the newbie section, don't forget that he is a newbie. Be specific and give examples.
Hi, sorry for refreshing, but the page with answer isn't available or I don't have access.
So how to change the name of qtoolbox?
The best title will be name of menu position which user clicked.
For example I have a qtoolbox named SCOPE and in menu is in day, week, year. And if user will choose week, the title of qtoolbox from SCOPE will change to WEEK.
So i need to know two things. How to return the QString Which user clicked, and how to change the name of qtoolbox.
The second problem I think I can solve just like that:
Qt Code:
QString userScope; userScope= ... //here we get what user clicked ui->toolButton->setText(userScope);To copy to clipboard, switch view to plain text mode
Try this link.Hi, sorry for refreshing, but the page with answer isn't available or I don't have access.
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
Yea... you can answer for 90% questions like that. Don't be unpleasant. This is the newbe section.
Of course I tried to find answer in Google, but it faild, so I wrote here. I don't think this question is stupid.
Yes it is, but it isn't substitute for reading the documentation. If you already know you want to use QToolBox to achieve some GUI feature, then reading its documentation (especially the Detailed Description section) would have revealed that the signal QToolBox::currentChanged() together with the method QToolBox::itemText() will tell you which string the user clicked. And don't forget to also look at the documentation for the base class(es) if you don't see a method or signal that does what you need.This is the newbie section.
All of us were Qt newbies once. I'm still a newbie in many areas of Qt I have not had need to use. The way I advance beyond newbie stage in the areas I don't know is to study the Qt documentation and examples, work through the tutorials, read some of the many Qt books, and use Google to find more examples, videos, and tutorials. Almost always I find something to answer the question or at least point me in the direction I need to go.
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
anda_skoa (27th November 2016)
You are right (in the some parts).
But keep in mind, that not everyone is egg-headed in programming. I read the documentation, or better to say I browsed it to find something what can be connected with my problem. I can not read every single part, every single class, because I do not have sufficed for that time. Documentation is written is specific language and people need time to get use to it. Really.
I did not think that QToolBox :: currentChanged () can be the way to solve it. And I think for that is this forum. People is giving some advises where to look. Now you gave me the clue where to search and this is good answer for my question. Really sir, documentation is very big piece of cake for newbie. We need to even learn how to search. So do not be mad That sometimes questions are too general or very simple.
Once more, thank you for help and giving and showing the way
Yeah, sorry for being so tough. I shouldn't give answers on the forum when I'm tired and grumpy. Don't take it personally - I also struggle with Qt documentation, and English is my first language. Qt is so big that sometimes you don't even know what to ask for, much less know which classes or subsystem will do what you want. And it just keeps getting bigger.Once more, thank you for help and giving and showing the way
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
Bookmarks