change font size and button size of QMessageBox
Hello everyone,
i am wondering if there is an easy way to change the size of fonts and of QMessageBox button. I am gonna be running the GUI in a rather small screen and need to make these bigger. Is it possible in an easy wawy or the only way is to make a msgBox class on my own?
thank you nass
Re: change font size and button size of QMessageBox
Re: change font size and button size of QMessageBox
no that wouldn't do it... the rest of the application has set font's and stuff... i only want to change the messageBox's font and button sizes...
Re: change font size and button size of QMessageBox
someone mentioned smth about
using html tags in my message..
but didn't go into detail... what is it i could do?
Re: change font size and button size of QMessageBox
Exactly ;)
Try this
Code:
QMessabeBox::information( 0, "Title" , "<font size = 10 color = red > Hello World </font> " );
Re: change font size and button size of QMessageBox
Quote:
Originally Posted by sunil.thaha
Exactly ;)
Try this
Code:
QMessabeBox::information( 0, "Title" , "<font size = 10 color = red > Hello World </font> " );
That will work for the message text, but you will have to either subclass QMessageBox in order to change the button font size, or call setFont() on a QMessageBox widget.
Re: change font size and button size of QMessageBox
One option to access the buttons (to modify their sizes) is to create an instance of QMessageBox (instead of using convenient static methods) and then use QObject::findChildren() to find the buttons.