跳到內容

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k 主題 77.4k 貼文
  • Dashboard

    2
    0 評價
    2 貼文
    799 瀏覽
    J
    sorry could be with the member function QWindow::QWindow(QWindow * parent)? but how i coul limit the position of this window to the parent area window?
  • Listview delgate signal and C++

    3
    0 評價
    3 貼文
    2k 瀏覽
    A
    Thank you very much for this perfect answer. However I would like to use a solution like this: The delegate is composed by: @Component{ id: song_Tab_Delegate Rectangle { id: itemDelegate property string arg: Filename //sets by list model .... MouseArea { anchors.fill: parent onClicked: { song_Tab_Delegate.ListView.view.currentIndex = index } ..... @ I've make a itemClick(string) signal in library_page, then in the listview i inserted @onCurrentIndexChanged: { if(currentIndex>=0) library_page.itemClick(currentItem.itemDelegate.arg) }@ But it doesn't find currentItem.itemDelegate. What is wrong? Thanks a lot Regards Andrea EDIT: I've solved the issue was that I had to write currentItem.arg. Well done for your book
  • [SOLVED] Problem with macdeployqt on Qt 5.4 RC

    5
    0 評價
    5 貼文
    20k 瀏覽
    C
    Hey shav, that worked. Thanks!
  • MouseArea/Button: Prevent double click and clicking on multiple buttons in a row

    1
    0 評價
    1 貼文
    2k 瀏覽
    尚無回覆
  • Opengl underlay

    7
    0 評價
    7 貼文
    3k 瀏覽
    sajis997S
    It will be fun then. Here goes the link to the repository: https://sajis997@bitbucket.org/sajis997/teapottessellationqt.git I am using Qt 5.2 with QtCreator 3.0.1 at ubuntu 14.04 at my end. Thanks
  • Is there a Qt Quick "view" to present two dimensional arrays (spreadsheet)?

    1
    0 評價
    1 貼文
    453 瀏覽
    尚無回覆
  • [SOLVED]binding from C++: value can not updated automatically

    5
    0 評價
    5 貼文
    1k 瀏覽
    R
    I must admit I'm not a big fan of the MEMBER decorator. You might be interested in my AUTO_PROPERTY macro. I wrote up my reasoning and links to the macro code in "this blog post":http://syncor.blogspot.com/2014/11/qt-auto-property.html. In addition to keeping your private implementation details private, it writes the notify signal for you.
  • Overlaying elements in a ListView

    2
    0 評價
    2 貼文
    791 瀏覽
    S
    I think I have a fix (code): @ import QtQuick 2.2 import QtQuick.Layouts 1.0 import QtQuick.Controls 1.2 import QtQuick.Window 2.2 Window { width: 300 height: 600 visible: true Component { id: rect Rectangle { width: view.width height: 30 color: "blue" y: 20*30+15 z: 2 } } ScrollView { id: scroll clip: true anchors.fill: parent ListView { id: view model: 100 Component.onCompleted: { rect.createObject(view.contentItem) } delegate: Rectangle { height: 30 width: view.width border.color: "black" Label { text: index z: 3 } } } } } @ Demo: !https://i.imgur.com/WSlGpjx.gif(demo)!
  • TextEdit with Arabic chars and img tag

    2
    0 評價
    2 貼文
    957 瀏覽
    M
    any idea? when i add image this pic begin draw from left to right, i think issue somewhere there. someone know how to say qml (html?) to draw img from right to left ?
  • [SOLVED]C++ slot in QML

    5
    0 評價
    5 貼文
    2k 瀏覽
    E
    Oh, yes, it is really helped! Thanks a lot!
  • Bug? Embedded Menu must be nested in Item.

    1
    1 評價
    1 貼文
    747 瀏覽
    尚無回覆
  • [Solved] New .ui.qml template

    2
    0 評價
    2 貼文
    1k 瀏覽
    T
    My mistake, when presented with the "MyFileForm" automatic name, I deleted "Form". Obviously the correct thing to do is keep that suffix, then the use of these files is obvious.
  • Can I invoke a Javascript method which is in Javascript file, directly from C++?

    1
    0 評價
    1 貼文
    517 瀏覽
    尚無回覆
  • Make button background visible on click

    3
    0 評價
    3 貼文
    1k 瀏覽
    R
    You could put the image in a rectangle and change the rectangle background color or you could use two images and just swap them. There would be lots of ways. Without more information it's hard to know what problem you're having and what you've already tried.
  • Access model in another qml component

    29
    0 評價
    29 貼文
    7k 瀏覽
    M
    I fixed this with JavaScript, probably not this best way but it works for me... TimleineVertical.qml: @ Row { id: deviceRow spacing: 20 Repeater { id: deviceRepeater model: attributes Button {id: deviceImageButton; anchors.verticalCenter: parent.verticalCenter; iconSource: deviceImage; width: 100; height: 100; onClicked: setVisibleDetail(detailRectangle, deviceItem), setTest(euro, kwh, time, euroText, kwhText, timeText) style: TimelineDeviceButtonStyle{} } } @ JavaScript to set the values from the model for the text element: @ function setTest(euro, kwh, time, euroText, kwhText, timeText) { euroText.text = euro; kwhText.text = kwh; timeText.text = time; } @ Text element: @ Text { id: euroText anchors.top: parent.top anchors.topMargin: 30 anchors.left: parent.left anchors.leftMargin: 20 font.pixelSize: 12 } @
  • Android Newbie: On Samsung Note 3 KitKat (4.4.2)

    5
    0 評價
    5 貼文
    2k 瀏覽
    idlefrogI
    I am using: NDK: r10d (64-bit) SDK: r24
  • Slowing down the speed of the Transition

    5
    0 評價
    5 貼文
    1k 瀏覽
    sierdzioS
    Create a state definition for your default state and make sure you set the position well there. By default, your image is anchored, so when you change the state to hideLogo, that anchor is broken. An alternative would be to define hideLogo transition as AnchorAnimation instead of NumberAnimation. You can also look up reversible property of Transition - "link":http://doc.qt.io/qt-5/qml-qtquick-transition.html#reversible-prop. And restoreEntryValues in ProeprtyChanges - "link":http://doc.qt.io/qt-5/qml-qtquick-propertychanges.html#restoreEntryValues-prop.
  • QML: how to upload a photo from Camera to a web server using XMLHttpRequest

    7
    0 評價
    7 貼文
    6k 瀏覽
    M
    I can not get the code to work. Maybe the code of uploadimage.cpp is missing? Anybody can help me? Thanks in advance
  • Import QtQuick.Enterprise.Controls 1.2 [solved]

    4
    0 評價
    4 貼文
    3k 瀏覽
    P
    Thx. Thought I read something on one of the "News" blurb pages that implied the enterprise controls were included in the indie license. Link above is pretty clear. Sigh. Off to "re-invent the wheel land". ;-)
  • Get QPixmap from Image Item in C++

    7
    0 評價
    7 貼文
    3k 瀏覽
    U
    bq. I cannot use that method because I’m writing a library, so the functionality that I need will be used by the users of the library not by myself. You probably can put it into the library, i.e. the plugin, with: @void QQmlExtensionPlugin::​initializeEngine(QQmlEngine * engine, const char * uri)@ Just register the image provider with the engine in that function. There is nothing preventing you from creating a pixmap from a file in qrc, but it would be quite limiting only being able to use images packed in the resource file.