So my question is this true and if this definition also goes for a function's local pointers.
No, you still have to call delete on anything that you choose to new in a function. In fact, I think that Qt only deletes certain pointers and only if you have the right flags specified, for instance by calling setAttribute( Qt::WA_DeleteOnClose ) in the constructor of your Q_OBJECT I can't understand why primaryColumnCombo setting its minimum size by the ideal size of the secondaryColumnCombo
I think that this is an example of how to make an expanding sort dialog from the book " C++ GUI Programming with QT 4 " or one of its predecessors. Correct? If so, it explains in the text that the secondary and tertiary combos have the default text "none" in them, which is the widest entry of any of the three combos on the dialog. To prevent the primary combo from resizing in an ugly way when the "More" button is clicked, the primary combo takes its hint from the (wider) secondary combo.
And how does "ch" will become equal to "last"?
If this is indeed the example that I mentioned, then last is passed in as an argument to the setColumnRange function.And in QString(ch) is "ch" is type getting typecasted!
Yes, it is. The addItem member of QComboBox takes a reference to a QString as its argument, not a QChar . However, QString has a constructor that takes a QChar so you can do a kind of typecast by making a temporary QString like you see here.
This seems to be drifting away from your original question. If you have solved that issue, you should mark this thread as "solved" and start a new thread for additional questions :)