Questions tagged [qsplitter]

The QSplitter class, part of the Qt framework, implements a splitter widget.

A splitter lets the user control the size of child widgets by dragging the boundary between the children.

90 questions
3
votes
1 answer

Resizing QSplitter doesn't respect QSizePolicy or setStretchFactor?

I set the size policy of items in a QSplitter but it doesn't seem to affect anything. When I resize the window in the example below I want my left widget to stop growing once it reaches its size hint (QSizePolicy.Preferred) and the right widget to…
pyjamas
  • 4,608
  • 5
  • 38
  • 70
3
votes
1 answer

QSplitter() doesn't treat a QScrollArea() and QFrame() equally

1. Problem explained I'm experimenting with Qt's QSplitter() widget. I've built a very simple sample project in PyQt5 showing a QSplitter() encapsulating a QScrollArea() on the left and a QFrame() on the right: I've given both the QScrollArea() and…
K.Mulier
  • 8,069
  • 15
  • 79
  • 141
3
votes
2 answers

How to control spacing inside of QSplitter

The code below creates a dialog window with a QSplitter. The left and right side of splitter is assigned a dark-colored QWidget. Each QWidget layout's spacing was set to 0 (zero) (so there should be no margin). To each of these 0-spacing layouts…
alphanumeric
  • 17,967
  • 64
  • 244
  • 392
3
votes
1 answer

QSplitter handle bar

I am using python 2.6 and compatible PyQt4 version 4.5.3, In my window i am using QSplitter for two QTableWidget but i am not able to find the split bar between two widgets. but in Autodesk Maya software the splitter is having a handle as dots. Can…
2
votes
3 answers

QTabWidget insert a QSplitter can't switch when the splitter disabled

I insert a QFrame and QTabWidget in the QSplitter. And I wanna forbidden to adjust the size of elements in QSplitter. So I call method of 'setDisabled' in QSplitter. It's useful for disabling resizing the elements. But I also can't switch tab of…
Jason Liu
  • 23
  • 4
2
votes
1 answer

QSplitter, QWidget resizing, setSizes(), setStretchFactor(), and sizeHint() - how to make it all work together?

I'm struggling with working out how to make all the stuff in the title work together in a certain situation. I'm using PyQt5 here, but feel free to respond with regular C++ Qt as I can translate pretty easily. I'm attempting to make a UI with the…
cdahms
  • 3,402
  • 10
  • 49
  • 75
2
votes
1 answer

Is it possible to set a width for a Widget without Fixing it?

I'm trying to set the width of a QScrollArea in PyQt5, but the only thing I found is setting the width through the scroll.setFixedWidth(360) function. The issue is when I put the scroll bar area in a QSplitter self.splitter2 =…
ymmx
  • 4,769
  • 5
  • 32
  • 64
2
votes
1 answer

How to display self defined QSplitter Class onto QMainWindow

I am currently trying to display a split screen view onto my window using PyQt5 with QSplitter and QMainWindow. I need QMainWindow to be able to create the menu options for the application that I am working on and would need to use QSplitter to use…
2
votes
1 answer

How to create a grid of splitters

What I'm trying to do is add splitter to a QGridLayout in order to resize the layout with the mouse. So for instance with this : from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import * import sys class…
ymmx
  • 4,769
  • 5
  • 32
  • 64
2
votes
1 answer

How to set the initial size of a QTreeView in a QSplitter?

I have a QTreeView inside of a QSplitter that I want to set the initial size of. I have found that I can set both setMinimumWidth(val) and setFixedWidth(val) on the QTreeView, but neither of those seem to do what I need. The setMinimumWidth(val)…
artomason
  • 3,625
  • 5
  • 20
  • 43
2
votes
1 answer

Implementing splitter with PyQt (QtCreator generated file)

I use QtCreator but I cannot find QSplitter in the UI builder so I guess it's added later with the rest of the code. My question is: How to add a QSplitter without screwing my GUI? This is the basis layout look of my main window: I need to have a…
nephilimrising
  • 135
  • 3
  • 18
2
votes
1 answer

Remove a specific QWidget from a QSplitter

I want to remove a specific Qwidget from a QSplitter (or theQSplitterwith it is the best choice i thing) after i create 2-3 of them. To do this, i thing that i need to get the index of every widget that i create. This is my code: class…
Pablo Flores
  • 667
  • 1
  • 13
  • 33
2
votes
1 answer

replace widget in Qsplitter without losing the stretch factor

I have 2 widgets(buttons) in the same splliter and i want to replace the first one with Tabwidget.. i lose the right stretch factor (1:1) it will be like (2:1) or not like the old factor (when it's just 2…
2
votes
2 answers

Reparenting a Qt widget

I have a WidgetA widget, which is an owner-drawn widget. It's currently placed in QMainWindow's QVBoxLayout. After clicking a button, I'd like to "detach" WidgetA from this QVBoxLayout, insert QSplitter into this QVBoxLayout and "readd" WidgetA to…
antonone
  • 2,045
  • 1
  • 25
  • 35
2
votes
1 answer

Qt QSplitter fixed-height widget on window resize

I have a vertical QSplitter in the main window of my Qt desktop app with 2 widgets. I'm trying to find a way to have it so the height of the bottom widget remains fixed when resizing the window, but can still be resized by the user when they drag…
Kver
  • 767
  • 5
  • 19