Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. alignment problem with DayOfWeekRow and WeekNumberColumn
Qt 6.11 is out! See what's new in the release blog

alignment problem with DayOfWeekRow and WeekNumberColumn

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 227 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.
  • JM baubetJ Offline
    JM baubetJ Offline
    JM baubet
    wrote on last edited by
    #1

    Hello everyone,
    I am sour MAC OS and I create a QML Python application
    I'm making a calendar widget, with QTCreator.
    No particular problem at runtime when I launch my application with QtCreator.
    Run_Qtcreator.png

    But if I run it from a terminal with the python3 main.py command I have alignment problems for the widgets DayOfWeekRow and WeekNumberColumn.
    python3_cmd.png

    Does anyone have an explanation?

    Thanks

    This my code

    
    
        WeekNumberColumn {
            id: week_col
            anchors.top:  corner.bottom
    
            anchors.left: parent.left
            implicitWidth: corner.width
            implicitHeight: 222
            //spacing: 1
            leftPadding: 0
            rightPadding: 0
            month: month_grid.month
            year: month_grid.year
            locale: dateTimeLLocale
    
            delegate: Text {
                Layout.fillWidth: true
                Layout.fillHeight: true
                text: weekNumber
                font: week_col.font
                color: Material.foreground
                horizontalAlignment: Text.AlignHCenter
                verticalAlignment: Text.AlignVCenter
                required property int weekNumber
            }
            contentItem: Rectangle {
                color: Material.color(couleur, Material.Shade200)
    
                //border.color: "black"
                ColumnLayout {
                    anchors.fill: parent
                    spacing: week_col.spacing
                    Repeater {
                        model: week_col.source
                        delegate: week_col.delegate
                    }
                }
            }
        }
    
        //1-7
        DayOfWeekRow {
            id: week_row
            anchors.top: choixMois.bottom
            anchors.left: corner.right
            anchors.right: parent.right
            implicitHeight: corner.height
            spacing: 0
            topPadding: 0
            bottomPadding: 0
            locale: Qt.locale("fr_FR")
    
            delegate: Text {
                Layout.fillWidth: true
                Layout.fillHeight: true
                text: shortName
                font: week_row.font
                color: Material.foreground
                horizontalAlignment: Text.AlignHCenter
                verticalAlignment: Text.AlignVCenter
                required property string shortName
            }
            contentItem: Rectangle {
                //color: Material.backgroundColor
                color: Material.color(couleur, Material.Shade200)
    
                RowLayout {
                    anchors.fill: parent
                    spacing: week_row.spacing
                    Repeater {
                        model: week_row.source
                        delegate: week_row.delegate
                    }
                }
            }
        }
    
    
    
    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