跳到內容

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k 主題 77.7k 貼文
  • Do I need to have enterprise Visual Studio 2013 to debug the QML project in Qt creator?

    2
    0 評價
    2 貼文
    2k 瀏覽
    SGaistS
    Hi and welcome to devnet, No there's no need for the Enterprise Edition of Visual Studio 2013. However you wrote that you have Visual Studio 2012, is that a typo ? If not, then you either have to install VS2013, or download the VS2012 Qt build. On Windows, you can't mix compilers, they are not compatible one with the other.
  • Error adding a Menu in QML

    qml
    2
    0 評價
    2 貼文
    621 瀏覽
    timdayT
    This one is discussed on http://stackoverflow.com/questions/32142565/error-adding-a-menu-in-qml ; there's some stuff there on how hard (impossible?) it is to dynamically add a Menu to a MenuBar, but maybe we're both missing some other trick.
  • QML Direct fetch a model from C++

    7
    0 評價
    7 貼文
    2k 瀏覽
    K
    HELPED ME A LOT http://stackoverflow.com/questions/29558138/use-a-qabstractlistmodel-in-another-one
  • 0 評價
    5 貼文
    2k 瀏覽
    I
    @chrisadams No, there is no change at all with QML_NO_TOUCH_COMPRESSION enabled
  • QML: Change ToolBar color / one style property only

    qml toolbar background colo style
    5
    0 評價
    5 貼文
    7k 瀏覽
    M
    I have a similar problem too. I want to change the font size and I get a fallback base style. I've already reported a bug against Qt. Maybe we could find another workaround in the meantime. All the android styling seems done by the AndroidStyle singleton object coming from QtQuick.Controls.Styles.Android 1.0 module. They do, for example Style { readonly property Button control: __control property Component panel: Item { id: panel readonly property var styleDef: control.checkable ? AndroidStyle.styleDef.buttonStyleToggle : AndroidStyle.styleDef.buttonStyle // some more code } see ButtonStyle.qml But, if we look further, styleDef seems specific to the Android drawables, see this commit And the Android Button.qml seems to use something like this for setting the style style: Settings.styleComponent(Settings.style, "ButtonStyle.qml", button) But I don't know where the settings come from See Button.qml Do you have any idea what to do with it? I don't see any other option that copying the Android Styles tree and adapting it to our needs. But it's awful.
  • 0 評價
    3 貼文
    1k 瀏覽
    C
    You should be able to do this declaratively, by declaring either: width: image.width OR width: childrenRect.width for the "element" column. Note that this will "bind" the values. Binding is automatic in QML declarations. If you wish to bind from an imperative statement (ie, from within a JavaScript function) you can use: width = Qt.binding(function() { image.width }); Hope this helps!
  • 0 評價
    9 貼文
    4k 瀏覽
    SGaistS
    You're welcome ! SInce everything is OK now, please update the thread title prepending [solved] so other forum users may know a solution has been found :) Also, while browsing the forum, consider up-voting the answers that helped you, it will make them easier to find for other users :)
  • [Solved] Question about OpenGL Under QML example

    qml opengl
    4
    0 評價
    4 貼文
    1k 瀏覽
    timdayT
    @johngod Be slightly wary that if the QList isn't actually owned by the Renderer... there's a chance it could be deleted when the non-Render bit of your application is being torn down but the QSG render thread is still doing its last frame. Using a QSharedPointer<QList> should keep the data around until everyone's done with it. Yes having to do everything OpenGL-ey in the render thread can be a bit of a pain... especially for resources which might be shared by multiple items and you just want to initialize them and move on. (Took me a while to realize that... the platform I started off on - Linux+Nvidia - seemed quite tolerant of abuse, but then the Mac port didn't like it at all).
  • Any sample code that drawing images quickly from byte array stream

    1
    0 評價
    1 貼文
    333 瀏覽
    尚無回覆
  • How to know when a qml starts to being displayed and when it is hidden

    6
    0 評價
    6 貼文
    10k 瀏覽
    johngodJ
    @xargs1 by being displayed I mean the window visiblility changed from false to true and being hidden the window visibilty changed from true to false :) I usually use states binded to the windows visibilty, that way I ensure that I only have one windows visible at the time. It is up to the developer to choose best option to fit its needs, and this is just one possible example. Of course this wont work in one shows a window above another using the z order, for example.
  • Using "Light" font weight from a font family doesn't work

    font family weight
    1
    0 評價
    1 貼文
    1k 瀏覽
    尚無回覆
  • Problem with MouseArea in delegate

    Solved mousearea
    14
    0 評價
    14 貼文
    8k 瀏覽
    p3c0P
    @nnnnn Hmm. I overlooked your onEntered requirement. It doesnot work in my example. The problem is that once you set mouse.accepted=false the release event is not trapped.
  • evil QtBug: QML "external Drag and Drop" unusable in Ubuntu.

    1
    0 評價
    1 貼文
    404 瀏覽
    尚無回覆
  • Center all Items to the middle of the screen

    4
    0 評價
    4 貼文
    1k 瀏覽
    C
    @ubik said: It should look like that: http://fs1.directupload.net/images/150818/qiufx8st.png But it looks like that: http://www.bilder-upload.eu/show.php?file=31e598-1439891706.png How can I center all Items to the middle of the screen? Actually, as the first picture is really schematic, I don't even understand what is the difference between what you want and what you get... If you want it to be horizontally centered, it's seems good for me, by the way. If you want it to be vertically centered, I don't understand why you didn't just add anchors.verticalCenter after anchors.horizontalCenter in your Grid element : Grid { id: myGrid rows: 4 columns: 1 width: parent.width height: partent.height spacing: 50 anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter ...
  • ListView currentIndex strange behaviour

    listview binding
    1
    0 評價
    1 貼文
    812 瀏覽
    尚無回覆
  • QML Javascript debugger crashes

    javascript debugging crash
    1
    0 評價
    1 貼文
    1k 瀏覽
    尚無回覆
  • Directory imports when using a QRC resource file with prefixes

    4
    0 評價
    4 貼文
    4k 瀏覽
    p3c0P
    @Monomix Ok. But I'm not sure if resources work with qmlscene.
  • [Solved] How to take a Print in QML?

    15
    0 評價
    15 貼文
    21k 瀏覽
    I
    @p3c0 said: @IT-MAN-2015 Thanks for sharing :) You're welcome :) Have a nice time.
  • How to link against the QTTest

    3
    0 評價
    3 貼文
    934 瀏覽
    SGaistS
    Hi and welcome to devnet, It's because you modified your pro file. Running qmake after that will refresh the Makefiles with the needed content to build your project correctly.
  • [Solved] TextField / TextInput do not emit textChanged signal

    3
    2 評價
    3 貼文
    10k 瀏覽
    I
    Applies to Android, too. TextField will not fire onTextChanged unless you provide it with inputMethodHints: Qt.ImhNoPredictiveText.