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. Will QWidget::layoutDirection() ever return Qt::LayoutDirectionAuto ?

Will QWidget::layoutDirection() ever return Qt::LayoutDirectionAuto ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 139 Views
  • 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.
  • B Offline
    B Offline
    buhtz
    wrote on last edited by
    #1

    My question is about LayoutDirection.

    To my understanding and observation of real code asking a widget for its direct via QWidget::layoutDirection() will always return LeftToRight or RightToLeft but never LayoutDirectionAuto.

    If a widget has LayoutDirectionAuto it will ask its parent and return that value.

    Is this assumption correct?

    jsulmJ 1 Reply Last reply
    0
    • B buhtz

      My question is about LayoutDirection.

      To my understanding and observation of real code asking a widget for its direct via QWidget::layoutDirection() will always return LeftToRight or RightToLeft but never LayoutDirectionAuto.

      If a widget has LayoutDirectionAuto it will ask its parent and return that value.

      Is this assumption correct?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @buhtz said in Will QWidget::layoutDirection() ever return Qt::LayoutDirectionAuto ?:

      If a widget has LayoutDirectionAuto it will ask its parent and return that value

      Yes, is stated here https://doc.qt.io/qt-6/qt.html#LayoutDirection-enum
      "When used in conjunction with widgets and layouts, it will imply to use the layout direction set on the parent widget or QApplication"

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

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