[Solved] QPrintDialog crashes when opening advanced options

Megasa3 Asks: QPrintDialog crashes when opening advanced options
I had a QPrintDialog like this:

Code:
QPrintDialog pDialog(printer, parent);
if (pDialog.exec() == QDialog::Accepted)

That seems to work perfect but there is one way where it makes the program crash. Let me explain: I Open the print dialog where I have, let’s say, printerA and printerB. Then I use the print search and I find printerC (which is in the network). Then I go to preferences of this printerC(inside the same print dialog) which opens another dialog. Inside this second dialog, there are different tabs (Advanced Options, Shortcuts, quality/paper, effects, ends, works and colors). If I navigate through all those tabs it works perfect except for Advanced Options. When I click on that tab, the program closes (I can’t even see the error or the problem).

I’ve also tried to change the code to:

Code:
QPrintDialog pDialog(printer, parent);
try
{
  status = (pDialog.exec()==QDialog::Accepted);
}
catch (...)
{
  - some code -
}

But it doesn’t work and doesn’t stop by the catch.

I am not sure if the printerC is still on network or has any connection problem but the dialog let’s me choose it on the menu and as I said, all works fine until the advanced options tab.

Any idea of why may this happen? Or maybe how could I avoid the program to suddenly close?

Thank you in advance.

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.