QSplitter

Tech support and suggestions forum. If you only have a basic question on how to get started, please use the "newbies" forum in the community section.

Moderator: joepal

QSplitter

Postby blindsaypatten » Sat Dec 08, 2018 8:18 pm

QT5 has a QSplitter widget:
The QSplitter class implements a splitter widget.

A splitter lets the user control the size of child widgets by dragging the boundary between them. Any number of widgets may be controlled by a single splitter. The typical use of a QSplitter is to create several widgets and add them using insertWidget() or addWidget().


Could we use this in create() in the Frame class in qtui instead of GridLayout so that we can adjust the allocation of horizontal space between the three main panels?
Code: Select all
self.h_layout = QtWidgets.QGridLayout()
...
self.h_layout.addWidget(self.l_panel, 0, 0)
...
self.h_layout.addLayout(self.t_layout, 0, 1)
...
self.t_layout.addWidget(self.canvas)
...
self.h_layout.addWidget(self.r_panel, 0, 2)

to
Code: Select all
self.h_layout = QtWidgets.QSplitter()
...
self.h_layout.addWidget(self.l_panel)
self.h_layout.addWidget(self.t_layout)
self.h_layout.addWidget(self.r_panel)


With the current setup long labels sometimes get truncated because the side columns are not wide enough, e.g. if you have subdirectories in the custom folder.

I can't immediately think of any disadvantage to using QSplitter.

Pretty please!? :D

P.S. I have no experience with Qt so I might be wrong, but you might not need t_panel, top, and t_layout when using QSplitter, just adding the canvas directly might work.
blindsaypatten
 
Posts: 586
Joined: Tue Mar 14, 2017 11:16 pm

Re: QSplitter

Postby joepal » Sun Dec 09, 2018 9:29 am

Without having looked into what possible side effects there might be, this sounds like a good idea.

I'm going to add it to the todo list.
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4473
Joined: Wed Jun 04, 2008 11:20 am

Re: QSplitter

Postby blindsaypatten » Mon Dec 10, 2018 2:55 am

joepal wrote:Without having looked into what possible side effects there might be, this sounds like a good idea.

I'm going to add it to the todo list.


Thanks! :D
blindsaypatten
 
Posts: 586
Joined: Tue Mar 14, 2017 11:16 pm


Return to Bugs, problems and feature requests

Who is online

Users browsing this forum: No registered users and 1 guest

cron