[SOLVED] Problem with QMessageBox
-
yes, if I show only tmpStrTmp in the QMessageBox, it shows its content.
-
I overlooked that - so your problem is the size of your QMessageBox?
Can you describe how it looks or post a picture? -
By using this code
@ QString mex = "Error while reading vector.<br/><br/>Please check in:<br/><br/> " + tmpStrTmp ;
QMessageBox::critical(this, "Error", mex);@the QMessageBox looks like this:
https://drive.google.com/a/hydros.ch/file/d/0B7vJt21ZesT0bkJMY2Y2dFFKNTA/edit?usp=sharing
and with this code
@ QString mex = tmpStrTmp ;
QMessageBox::critical(this, "Error", mex);@the QMessageBox looks like this:
https://drive.google.com/a/hydros.ch/file/d/0B7vJt21ZesT0SGIwN3FxM0Q1c2s/edit?usp=sharing
Can you see the photos?
-
So I don't think that the problem is the size cause, the dialog adapt itself according to the content...
-
I can see the pictures and I think I understand your problem now and will try to simulate it here.
-
Hi,
I made some tests with your messages and I think your problem has something to do with the special characters in your tmpStrTmp. -
I thought it too, maybe because there are < and >? but why I can display tmpStrTmp without problem but with the rest of the message not? strange
-
You are right: it really sounds strange!
I would do this: Change all special chars by a placeholder then rebuild the string by replacing the placeholders step by step with the specials. -
you know? I solved the problem....< and > caused the problem, I replaced them with & lt; and & gt; and worked! I think because "mex" contains html tag (<br/>) and so it interpreted all like html....I don't know how to explain it with the right words, but I hope you understood. Thank you Clochydd, I really appreciate your help! Have a nice day? evening? bye
-
You are welcome, valeSimu!
Please sign your thread as solved, by adding a prepending [SOLVED] to your first post.
Have a nice day, too!