Python Forum
Using Grid layout and QHBox
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using Grid layout and QHBox
#1
Hello, I have built a Grid with 2 rows and 3 columns. On the 2nd row 1st column where I am trying to insert the QHBox I get this error which I am trying to solve:

Error:
TypeError: arguments did not match any overloaded call: addWidget(self, QWidget): argument 1 has unexpected type 'QHBoxLayout' addWidget(self, QWidget, int, int, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'QHBoxLayout' addWidget(self, QWidget, int, int, int, int, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'QHBoxLayout'
Any idea?
Reply
#2
By now you should know that you cannot provide an error trace without any code.

My guess is you used addWidget to add a layout to a layout. To add one layout to another layout use addLayout() instead.
hobbyist likes this post
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  pyqt5 layout Nickd12 8 3,519 Jan-18-2021, 09:09 AM
Last Post: Axel_Erfurt
  [Kivy] Weird spacing in grid layout test 3 3,472 Nov-08-2019, 04:37 PM
Last Post: Axel_Erfurt
  Python GUI layout off between different OS shift838 5 3,728 Jan-02-2019, 02:53 AM
Last Post: shift838
  [Tkinter] grid layout neech 8 17,687 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