2016-09-18 121 views
1

我在Qt5.7.0 QtCreator 4.1中編寫了一個移動應用程序,而且我在QtQuick qml文件'無效屬性名稱樣式「(M16) '並且表單不想顯示某些內容。我做錯了什麼?Qml QtQuick2'無效屬性名稱'樣式'(M16)'

我必須在項目中配置一些東西或使用其他類型的文件嗎?

我試圖在一些組件上使用這個屬性,它只適用於Text對象,我不知道爲什麼。

這裏是我的代碼:

//register_form.qml 
import QtQuick 2.0 
import QtQuick.Controls 2.0 
import QtQuick.Controls.Styles 1.4 
import QtQuick.Layouts 1.1 
Item { 
    width: 270 
    height: 480 
    anchors.fill: parent 

    ColumnLayout { 
     id: loginLayout 
     anchors.rightMargin: 15 
     anchors.bottomMargin: 92 
     anchors.leftMargin: 23 
     anchors.topMargin: 91 
     anchors.fill: parent 

     TextField { 
      TextFieldStyle { 
        id: phoneStyle 
        placeholderTextColor: "grey" 
      } 
      id: phoneField 
      placeholderText: "+7 XXX XXX XX XX" 
      Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom 
     } 

     Button { 
      style: //error occurs here 
       ButtonStyle { 
       } 
     id: loginButton 
     text: "Next" 
     Layout.alignment: Qt.AlignHCenter | Qt.AlignTop 
     highlighted: true 
     } 
    } 
} 

回答

相關問題