You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Saturday, May 19th 2012, 10:17am

An algorithm (= math stuff) in a message box?

Hi all.

I have created a GUI of an algorithm with Qt (what a great experience!). I have a button HELP that opens a massage box in which I would like to write the algorithm, that is ... a lot of not friendly mathematical formulas.
Which is the best way to do that?
My possible solutions are:
(1) to write down the algorithm with html, even if html is not very suitable for math.
(2) to include an image in the box, but I do not really know how to that and which the images that are allowed: for example could I include a pdf?
(3) is it possible to use a pdf instead of the message box? I mean, I click the button and a pdf is opened with a pdf reader.

Thank you for any suggestion. Have a good day.

2

Saturday, May 19th 2012, 2:47pm

to add an image, us QLabel and setPixmap(...);

if you want to view pdf, you will need another library - look here http://doc.qt.nokia.com/qq/qq27-poppler.html


You may need to make your own QDialog as I think the ready made MessageBoxs only cater for text
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

3

Monday, May 21st 2012, 10:27am

OK, thank you. I'll try to make an image from my pdf and then arrange it in a qdialog (I guess you're right, qmessagebox is only for text)
Thank you!

Similar threads