Python Forum
PyQt5 Relative Layout
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PyQt5 Relative Layout
#1
Hello, I'm working with qt designer for python and is there any way of making QvBoxLayout with QEditBox within it relative to size of QMainWindow, so when it resizes text box get resized automatically, I need this for designer.
Reply
#2
What is QEditBox?

save it as main.ui and load it in designer. I used QTextEdit as an example.

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
 <class>MainWindow</class>
 <widget class="QMainWindow" name="MainWindow">
  <property name="geometry">
   <rect>
    <x>0</x>
    <y>0</y>
    <width>800</width>
    <height>600</height>
   </rect>
  </property>
  <property name="windowTitle">
   <string>MainWindow</string>
  </property>
  <widget class="QWidget" name="centralwidget">
   <layout class="QVBoxLayout" name="verticalLayout">
    <item>
     <widget class="QTextEdit" name="textEdit"/>
    </item>
   </layout>
  </widget>
  <widget class="QMenuBar" name="menubar">
   <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
     <width>800</width>
     <height>21</height>
    </rect>
   </property>
  </widget>
  <widget class="QStatusBar" name="statusbar"/>
 </widget>
 <resources/>
 <connections/>
</ui>
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  pyqt5 layout Nickd12 8 3,526 Jan-18-2021, 09:09 AM
Last Post: Axel_Erfurt
  Huge code problems (buttons(PyQt5),PyQt5 Threads, Windows etc) ZenWoR 0 2,845 Apr-06-2019, 11:15 PM
Last Post: ZenWoR
  Python GUI layout off between different OS shift838 5 3,734 Jan-02-2019, 02:53 AM
Last Post: shift838
  PyQt5: Add Variable Number of Rows to Layout Based on Python Dictionary kennybassett 2 4,769 Oct-02-2018, 02:05 PM
Last Post: Alfalfa
  [Tkinter] grid layout neech 8 17,721 Oct-14-2016, 07:06 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020