Hi all;
I haven't need this before but this time I should learn.

The thin is, I add the sizes like this:
Qt Code:
  1. comboBoxST->addItem(QString::fromUtf8("A0 841 x 1189 mm"), QPrinter::A0);//5
  2. comboBoxST->addItem(QString::fromUtf8("A1 594 x 841 mm"), QPrinter::A1);//6
To copy to clipboard, switch view to plain text mode 
And then I save the current data of combobox to database like this:
Qt Code:
  1. bbb.bindValue(12, comboBoxST->itemData(comboBoxST->currentIndex()));
To copy to clipboard, switch view to plain text mode 
And it seams like intager. Actually same intager values at QT Assistant (QPrinter::PaperSize)

My question is, how could I return values like QPrinter::A4.
What made the codes easy for me like:
Qt Code:
  1. printer->setPaperSize(QPrinter::Letter);//normally I use like this but I have integer
  2. printer->setPaperSize(proporty_From_Value(int_a))
To copy to clipboard, switch view to plain text mode