How to add horizontal and verticle scroll bar to the QDialog? if the values in the qdialog goes downwards or rightwards. so that the scrollbar should appear automatically?
How to add horizontal and verticle scroll bar to the QDialog? if the values in the qdialog goes downwards or rightwards. so that the scrollbar should appear automatically?
On QDialog put QScrollArea and all widgets put on this area.
I have tried doing that.. But nothing happens.. here is the codeQt Code:
scroll->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded) scroll->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded) scroll->setParent(this); scroll-> setVisible(true);To copy to clipboard, switch view to plain text mode
Your scroll area has no content currently.
Is there anything to do with the above code provided?
What did you put in the scroll area? Is there anything at all? Did you put the scroll area in your widget's layout?
I couldnt get your point. Could you give me a change in the above code i want to make.. I am just creating QLabel at run time.. How to put the QLabel and the whole QDialog inside the QScrollArea()
Did you even read the example in QScrollArea docs? Do you see the differences between your code and the code of the example? Do you understand how QScrollArea works?
I have used the same code, but i am getting some exceptions out there
Bookmarks