qt - Stack 2 QTableWidgets -


I am editing the map for games currently created, and I have a small problem with QT. The first is that I use it, but I love the challenge and I thought it would be a great experience.

I am currently building my interface using QT Designer and I got stuck on the map area. Actually, my map is made up of 2 layers: area, and units / obstacles / vegetation

I am using a Qiblebuddt to include information on the terrain, but now I have another QibleBuddt Up with the exact same size, so that I can keep my units, etc. However, I do not know how to get it on Qt Designer. As soon as I create a new QTableWidget, it goes from the front side, not from the first side.

I thought about using QStackedWidget, but since it only allows 1 widget to be visible at one time, it is not fit in my expectation.

If someone has an idea, as small as possible, I would be very thankful.

Take a good day for everyone!

EDIT: From the top, I am not one side ... I know that it is difficult to explain if we believe that the axis we see on our screen is Z, I have both tables Equal to x axis Class = "post-text" itemprop = "text">

Note: This answer is closed - subject, as I misunderstood the question . The question is about stacking widgets, but to paint them all However, I leave it there if I write the future reader under the other Want to (See comments on questions for details.)


You can insert widgets by using one and the other below. Just select two table widgets and select 'Move out'> 'Stand out' in the context menu. Then you should use the layout to tell that the widgets should have the same size. As far as I know, spanning can be set using only C ++ code, not within your .ui designer file This ui- & gt; Setup (this); :

  ui-> After this, these two rows can be done by putting them into the constructor of their widget class. Vertical layout-> Set stretch (0, 50); // 50%, but the number is UI-> Vertical layout-> The set should not be stretch (1, 50); // in percent, so 1/1 is the same  

If I understand it correctly, you want a big widget, the main widget of your map editor and the two below On widgets or side If they are below, then you can put it in a QVBoxLayout and for example, spread to 3: 1: 1, 60% of the height available in the main widget and your two table widget Every 20%:

  ui-> Vertical layout-> Set stretch (0, 3); UI-> Vertical layout-> Set stretch (1, 1); UI-> Vertical layout-> Set stretch (2, 1);  

Comments

Popular posts from this blog

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -