Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt - Resolve issues with QLayout: Attempting to add QLayout
Forum Updated to NodeBB v4.3 + New Features

Qt - Resolve issues with QLayout: Attempting to add QLayout

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    salunkerahul
    wrote on 1 May 2013, 12:30 last edited by
    #1

    When using a Custom Widget within a form I get the following error "QLayout: Attempting to add QLayout "" to RangeWidget "Area", which already has a layout" when I switched to Qt-4.8.4, but work fine with Qt-4.5.3(no warning messages)

    QTabWidget
    ->QWidget
    ->QGroupBox
    ->custom-widget

    The custom-widget layout is as follows

    • QWidget
      • Area: QWidget
      • Limit: QWidget
        -Ranges - QGridLayout(2x2)

    There is no undefined behavior when running the application apart from the message that pops up on the terminal. Could members highlight why I get the QLayout messages having switched from Qt4.5.3 to Qt4.8.4?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 2 May 2013, 08:53 last edited by
      #2

      Hi and welcome to devnet,

      It means that you are trying to set a layout on a widget that already has a layout (so it fails). You must have something not clean in your code somewhere but you are lucky enough that it doesn't seem to have an impact.

      As for the why it did't on 4.5.3, I don't know, you would have to make a diff from these two versions.

      I would advise to recheck your code around this layout warning.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      1/2

      1 May 2013, 12:30

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved