跳到內容

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k 主題 77.7k 貼文
  • PinchArea and Zoom in QMl

    8
    0 評價
    8 貼文
    10k 瀏覽
    p3c0P
    No i guess, last one will override.
  • Editing elements of a listmodel -- binding in delegate does not work in both directions ?

    3
    0 評價
    3 貼文
    848 瀏覽
    S
    Hi, thanks a lot that makes sense. I'll try that.
  • Flickable and scale

    4
    0 評價
    4 貼文
    4k 瀏覽
    H
    [quote author="p3c0" date="1406713166"]Hi, @ Rectangle { id: board width: 1000 height: 1000 color: "green" transform: Scale { id: scale; origin.x: 500; origin.y: 500 } } @ To use: @ scale.xScale += 0.1 scale.yScale += 0.1 @[/quote] The same behaviour. Try to zoom in (+) and drag the rectangle downright.
  • Demo (solved)

    2
    0 評價
    2 貼文
    660 瀏覽
    B
    Hi, -For weather info you could use this API: http://www.worldweatheronline.com/free-weather-feed.aspx and show it in some labels. -For digital time: there's a widget in qt to do that, so you can get system time using QTime, and refreshing it using a Qtimer every second connected to an specific slot with your update routine. -For video: http://qt-project.org/doc/qt-5/multimedia-examples.html here you have a lot of examples. Best Regards, German Zapata Segura
  • Possible to tell the number of an item within a repeater?

    4
    0 評價
    4 貼文
    1k 瀏覽
    G
    These are exactly what I was looking for. I just found it in the documentation on repeaters also. Thanks! I ended up using the index like this: @Image { source: "button" + index + ".png" }@ because all my button images are buttonX.png.
  • [solved]display qt quick control calendar at a certain position

    4
    0 評價
    4 貼文
    1k 瀏覽
    p3c0P
    You're Welcome :) You can mark the post as solved by editing and prepending the thread title with [Solved]
  • Qt Quick Local Storage Export / Import Database

    6
    0 評價
    6 貼文
    3k 瀏覽
    p3c0P
    The file is actually created in a standard Data location of your system and that too inside the <your ApplicationName> folder. You can use "offlineStoragePath":http://qt-project.org/doc/qt-5/qqmlengine.html#offlineStoragePath-prop to get the path of DB.
  • How to Embed Thumbnail image on an Jpeg Image

    5
    0 評價
    5 貼文
    2k 瀏覽
    SGaistS
    @ Dheerendra what beemameni wants is not to superpose two images but to write the thumbnail version in the "meta-data" of the original image
  • Qt creator convertor

    3
    0 評價
    3 貼文
    929 瀏覽
    D
    hi the format of the image is mono_8 raw, because rosbag records in the format mono_8. I need another format to show the video in my qt gui, because qt cant visualize the format. I want to to convert from mono_8 to a rgb format
  • Set RegExpValidator to qml object

    1
    0 評價
    1 貼文
    566 瀏覽
    尚無回覆
  • Using Nokia components on custom platform

    1
    1 評價
    1 貼文
    548 瀏覽
    尚無回覆
  • ListView contentY changes on move

    7
    0 評價
    7 貼文
    4k 瀏覽
    S
    Hi, yes this is documented behaviour : The top postion of a flickable is defined by originY and this can be a negative number : check it out here : http://qt-project.org/doc/qt-5/qml-qtquick-flickable.html#originY-prop originX : real originY : real These properties hold the origin of the content. This value always refers to the top-left position of the content regardless of layout direction. This is usually (0,0), however ListView and GridView may have an arbitrary origin due to delegate size variation, or item insertion/removal outside the visible region. So you should use the originY value as the start position, instead of 0. OriginY can be negative, but should work fine as long as you take that into account in your calculations.
  • Can i use reference in signal slots

    14
    0 評價
    14 貼文
    4k 瀏覽
    JKSHJ
    [quote author="praneeth007" date="1406016204"]I want to modify those[/quote]You can't do that through signals and slots.
  • Setting static path to image source

    16
    0 評價
    16 貼文
    4k 瀏覽
    p3c0P
    Is the image accessible outside Rectangle ? You can try to use Image element directly instead of placing inside the Rectangle. But i don't think so that would be a problem.
  • QtAV: Qt Quick items display wrong textures

    1
    0 評價
    1 貼文
    1k 瀏覽
    尚無回覆
  • Create QML or JavaScript Object in C++

    5
    0 評價
    5 貼文
    2k 瀏覽
    W
    [quote author="Dheerendra" date="1406300961"]If you want QML object, that is the only way. If are not worried about QML, you can check QScriptable module for JavaScript and C++ integration. [/quote] Ok,I will try it.Thanks a lot~
  • Class member data are not available (empty)

    8
    0 評價
    8 貼文
    2k 瀏覽
    D
    Many thanks for the answers. I will try it and report.
  • QQmlComponent creation fails to set proper parent

    3
    0 評價
    3 貼文
    2k 瀏覽
    C
    Right. There are two different parenting concepts at play here: the first is the QObject (ownership) parent; the second is the QtQuick (scene / item) parent. Use setParentItem() to bring the item into the scene (by setting the item parent) and therefore make it visible.
  • How to add a check box or line edit elements in a combo box in Qt Quick

    5
    0 評價
    5 貼文
    4k 瀏覽
    L
    Hi Dheerendra, Thanks a lot but still its not what i am trying to acheive. I am posting my code, please have a look. Here is the code and the problem i am facing with combobox options is, neither i am not able to get icons in my message dialog nor i dont know how i can see checkbox or line edit in message dialog, i am a beginner and struggling to explore the tricky ways used in QML. @import QtQuick 2.2 import QtQuick.Controls 1.2 import QtQuick.Dialogs 1.1 import QtQuick.Window 2.0 Item { id: root width: 580 height: 400 SystemPalette { id: palette } clip: true //! [messagedialog] MessageDialog { id: messageDialog visible: messageDialogVisible.checked modality: messageDialogModal.checked ? Qt.WindowModal : Qt.NonModal title: windowTitleField.text text: customizeText.checked ? textField.text : "" informativeText: customizeInformativeText.checked ? informativeTextField.text : "" onButtonClicked: console.log("clicked button " + clickedButton) onAccepted: lastChosen.text = "Accepted " + (clickedButton == StandardButton.Ok ? "(OK)" : (clickedButton == StandardButton.Retry ? "(Retry)" : "(Ignore)")) onRejected: lastChosen.text = "Rejected " + (clickedButton == StandardButton.Close ? "(Close)" : (clickedButton == StandardButton.Abort ? "(Abort)" : "(Cancel)")) onHelp: lastChosen.text = "Yelped for help!" onYes: lastChosen.text = (clickedButton == StandardButton.Yes ? "Yeessss!!" : "Yes, now and always") onNo: lastChosen.text = (clickedButton == StandardButton.No ? "Oh No." : "No, no") } //! [messagedialog] Column { anchors.fill: parent anchors.margins: 12 spacing: 8 Text { color: palette.windowText font.bold: true text: "Message dialog properties:" } CheckBox { id: messageDialogModal text: "Modal" checked: true Binding on checked { value: messageDialog.modality != Qt.NonModal } } CheckBox { id: customizeTitle text: "Window Title" checked: true width: parent.width TextField { id: windowTitleField anchors.right: parent.right width: informativeTextField.width text: "Alert" } } Row { Text { text: "Combo box items and icon selection:" } spacing: 8 function createIcon(str) { switch(str) { case Critical: messageDialog.icon = StandardIcon.Critical console.log("Critical") break; case Question: messageDialog.icon = StandardIcon.Question break; case checkbox: //how to add checkbox here in order to show it in my message dialog ? break; case textedit: //how to add textedit here in order to show it in message dialog ? break; default: break } } ComboBox { id : cbox editable: true currentIndex: 0 model: ListModel { id: cbItems ListElement { text: "Critical"} ListElement { text: "Question"} ListElement { text: "checkbox"} ListElement { text: "textedit"} } onCurrentIndexChanged: console.debug(cbItems.get(currentIndex).text) onAccepted: parent.createIcon(cbItems.get(currentIndex).text) } } Rectangle { anchors { left: parent.left right: parent.right bottom: parent.bottom } height: buttonRow.height * 1.2 color: Qt.darker(palette.window, 1.1) border.color: Qt.darker(palette.window, 1.3) Row { id: buttonRow spacing: 6 anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left anchors.leftMargin: 12 width: parent.width Button { text: "Show Dialog" anchors.verticalCenter: parent.verticalCenter onClicked: messageDialog.open() } Button { text: "Close" anchors.verticalCenter: parent.verticalCenter onClicked: messageDialog.close() } } } } @
  • How to change TextField font size

    2
    0 評價
    2 貼文
    2k 瀏覽
    p3c0P
    Hi, Move it under TextField instead of style.