小编Mic*_*ski的帖子

如何在 ColumnLayout 中居中元素

如何将元素居中ColumnLayout

这是我的qml代码:

ApplicationWindow {
    id: root
    visible: true
    width: 640
    height: 640
    title: qsTr("Your Booking")
    GridLayout{
        anchors.fill: parent
        columns: 2
        flow: GridLayout.TopToBottom
        Rectangle{
            id: appBar
            Layout.columnSpan: 2
            width: root.width
            height: root.height/10
            color: "red"
        }
        ColumnLayout{
            spacing:5
            id: columnData
            height: root.height - appBar.height
            width: root.width/2

            ComboBox{
                 anchors.horizontalCenter: parent.horizontalCenter
            }
            ComboBox{

            }
            ComboBox{
            }
            ComboBox{
            }
            ComboBox{
            }
        }
        ColumnLayout{

        }

    }
}
Run Code Online (Sandbox Code Playgroud)

我想在 ColumnLayout 中居中组合框。

在此处输入图片说明

qt qtquick2

7
推荐指数
1
解决办法
6596
查看次数

无法解析 .travis.yml

我正在尝试使用 GitHub、Travis CI 和 AWS ECS 创建 CI 管道。当我将提交推送到 master 分支时,我在 travis CI 中遇到错误:“无法解析 .travis.yml”。我想不通,问题出在哪里。Travis 没有提供更多关于错误的信息。

有一个代码,我正在使用:

.travis.yml

language: csharp
dist: trusty
sudo: required
mono: none
dotnet: 2.0.0
branches:
    only:
        - master
before_script:
    - chmod -R a+x scripts
script:
    - ./scripts/dotnet-build.sh
    - ./scripts/dotnet-publish.sh
    - ./scripts/docker-publish-travis.sh
Run Code Online (Sandbox Code Playgroud)

dotnet-build.sh

 dotnet restore 
 dotnet build
Run Code Online (Sandbox Code Playgroud)

dotnet-publish.sh

dotnet publish ./BookMeMobi2 -c Release -o ./bin/Docker
Run Code Online (Sandbox Code Playgroud)

dotnet-publish-travis.sh

pip install --user awscli
eval $(aws ecr get-login --no-include-email --region eu-central-1)
docker build -t bookmemobi2 .
docker ps
docker tag bookmemobi2:latest …
Run Code Online (Sandbox Code Playgroud)

travis-ci docker aws-ecs

6
推荐指数
1
解决办法
5920
查看次数

标签 统计

aws-ecs ×1

docker ×1

qt ×1

qtquick2 ×1

travis-ci ×1