At the moment I've got a program setup with a main QHBoxLayout containing two widgets.
The right widget is a QTableView, and the left widget is a "blank" widget what I'm using to draw shapes is (basically a paint window). The only dimensional data I've given the "paint" widget is a recommended height and width using the sizeHint() function.
When I expand the whole MainWindow, the paint widget's width remains fixed, while the table widget expands to fill the new area.
A couple of questions:
- What is the easiest way to make both widgets' widths increase evenly as the main window expands?
- Is there a way I can add some sort of "drag bar" in between the widgets to enable resizing of both widgets while leaving the overall window size unchanged (i.e. increase one widget's width as the other decreases?
- Is it easy to add scroll bars to blank widgets? I want to be able to paint objects on a large area with dynamic size (i.e. often increasing or decreasing in size), but I'm not sure how I would go about doing this Are there any useful examples someone can point me to? Would it simply be a matter of adding scroll bars and setting the maximum width/height according to the furthest point I currently have painted to?
Bookmarks