agarny
29th July 2011, 10:51
Hi, I am currently trying to come up with a GUI solution for my application. Basically, my application can open one or several files. My application works in three different modes and then, within each mode, I can have one or several ways of interacting with a particular file (I call those ways: views).
So, the way I am currently thinking of it is by having a QGridLayout with has two rows and two columns:
- r0c0: a QTabWidget used to select the mode in which I want to operate;
- r0c1: a QTabWidget which is used to display different files depending on the mode and view selected;
- r1c0: nothing; and
- r1c1: a QTabWidget which tabs depend on the selected mode (see row 1, column 1), and which is used to select a particular view for the file.
Though I am happy with the overall GUI design (opinions on it are still welcome though!), I have two issues related to the use of a QTabWidget object in r0c0 and r1c1. Indeed, what is of interest to me in those QTabWidget objects are the tabs themselves, not the contents. This is why the size policy of those two objects is set to Minimum so that we 'only' see the tabs and nothing more. However, this doesn't quite work as I would like. I mean that if you look at the first attachment:
6721
You will see that the two QTabWidget objects render a 'bar' to the right / above the tabs. Also, there is a gap between r0c0 and r0c1, and r1c1 and r0c1. Ideally, both of those bars and the gap wouldn't be there... i.e. something similar to the second attachment (after manually editing the first attachment):
6720
So, my question is how would you personally go about doing what I am after?...
Cheers, Alan.
So, the way I am currently thinking of it is by having a QGridLayout with has two rows and two columns:
- r0c0: a QTabWidget used to select the mode in which I want to operate;
- r0c1: a QTabWidget which is used to display different files depending on the mode and view selected;
- r1c0: nothing; and
- r1c1: a QTabWidget which tabs depend on the selected mode (see row 1, column 1), and which is used to select a particular view for the file.
Though I am happy with the overall GUI design (opinions on it are still welcome though!), I have two issues related to the use of a QTabWidget object in r0c0 and r1c1. Indeed, what is of interest to me in those QTabWidget objects are the tabs themselves, not the contents. This is why the size policy of those two objects is set to Minimum so that we 'only' see the tabs and nothing more. However, this doesn't quite work as I would like. I mean that if you look at the first attachment:
6721
You will see that the two QTabWidget objects render a 'bar' to the right / above the tabs. Also, there is a gap between r0c0 and r0c1, and r1c1 and r0c1. Ideally, both of those bars and the gap wouldn't be there... i.e. something similar to the second attachment (after manually editing the first attachment):
6720
So, my question is how would you personally go about doing what I am after?...
Cheers, Alan.