Results 1 to 11 of 11

Thread: Change Title of toolbox's page. How?

  1. #1
    Join Date
    Jul 2010
    Location
    /home/hakermania/
    Posts
    233
    Thanks
    129
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Change Title of toolbox's page. How?

    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.

  2. #2
    Join Date
    Jul 2010
    Location
    /home/hakermania/
    Posts
    233
    Thanks
    129
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Change Title of toolbox's page. How?

    *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.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Change Title of toolbox's page. How?

    Come on, man. Bumping up a question after 12 hours?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Change Title of toolbox's page. How?


  5. #5
    Join Date
    Jul 2010
    Location
    /home/hakermania/
    Posts
    233
    Thanks
    129
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Change Title of toolbox's page. How?

    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.

  6. #6
    Join Date
    Nov 2016
    Location
    Poland
    Posts
    18
    Thanks
    5
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Change Title of toolbox's page. How?

    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:
    1. QString userScope;
    2.  
    3. userScope= ... //here we get what user clicked
    4. ui->toolButton->setText(userScope);
    To copy to clipboard, switch view to plain text mode 

  7. #7
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,315
    Thanks
    314
    Thanked 870 Times in 857 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Change Title of toolbox's page. How?

    Hi, sorry for refreshing, but the page with answer isn't available or I don't have access.
    Try this link.
    <=== 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.

  8. #8
    Join Date
    Nov 2016
    Location
    Poland
    Posts
    18
    Thanks
    5
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Change Title of toolbox's page. How?

    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.

  9. #9
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,315
    Thanks
    314
    Thanked 870 Times in 857 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Change Title of toolbox's page. How?

    This is the newbie section.
    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.

    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.

  10. The following user says thank you to d_stranz for this useful post:

    anda_skoa (27th November 2016)

  11. #10
    Join Date
    Nov 2016
    Location
    Poland
    Posts
    18
    Thanks
    5
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Change Title of toolbox's page. How?

    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

  12. #11
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,315
    Thanks
    314
    Thanked 870 Times in 857 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Change Title of toolbox's page. How?

    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.
    <=== 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.

Similar Threads

  1. QwtPlot Change Axis Title Alignment
    By deepy in forum Qwt
    Replies: 5
    Last Post: 20th October 2010, 13:40
  2. update tab's title when contents change
    By alexei in forum Newbie
    Replies: 3
    Last Post: 27th September 2010, 07:10
  3. how to change 'Thread title' in the forum
    By rishiraj in forum General Discussion
    Replies: 1
    Last Post: 1st April 2009, 07:00
  4. Title Bar Change setWindowModified
    By KaptainKarl in forum Qt Programming
    Replies: 2
    Last Post: 15th February 2007, 17:03

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.