Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.4k Posts
  • Creating dynamic content that is delivered by a Rest API

    4
    0 Votes
    4 Posts
    2k Views
    D
    K thx, I will give it a go :)
  • Vertical Header in TabelView

    3
    0 Votes
    3 Posts
    862 Views
    R
    After reading this thread I still don't really know how to achieve this. Could you short list the things what to do to achieve this? I'm quite new to QtQuick,,, Thank you,
  • Switching View multiple times between C++/QML

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • 0 Votes
    3 Posts
    3k Views
    N
    Yeh that was kinda what I'd thought. Currently my workaround for this to get CMake generate a .pro file. As long as I had the .pro file with contents such as: @ set(QtPROHelper ${CMAKE_BINARY_DIR}/something.pro) file(WRITE ${QtPROHelper} "#This File is Auto-Generated. Do Not Edit Manually.") file(APPEND ${QtPROHelper} "\nQT += qml quick widgets") file(APPEND ${QtPROHelper} "\nTARGET = something") file(APPEND ${QtPROHelper} "\n\nRESOURCES += $$quote(${CMAKE_SRC_DIR}/resources.qrc)") file(APPEND ${QtPROHelper} "\n\nOTHER_FILES += ") foreach(VIEW_FILE ${VIEW_FILES}) file(APPEND ${QtPROHelper} "$$quote(${VIEW_FILE}) ") endforeach()@ With just that I can open the project via the .pro when I need to work on the QML side of things and intellisense works fine. When I need to actually build the project/ work on the c++ side I just flip back to VisualStudio. You could ofc go all out and add the LIBS and INCLUDEDIR and such to get the .pro to compile as well but it wasn't needed.
  • QSGGeometry / scenegraph: how to reuse data from QSGGeometry

    2
    0 Votes
    2 Posts
    867 Views
    K
    Please check out the "code wrapping section":http://qt-project.org/wiki/ForumHelp#e3f82045ad0f480d3fb9e0ac2d58fb01 in the forum help. This helps to make your code more readable in the forum.
  • Setting a variable angle for the Transform: Rotation {} element?

    1
    0 Votes
    1 Posts
    911 Views
    No one has replied
  • Populating QAbstractListModel's current item values in controls

    1
    0 Votes
    1 Posts
    754 Views
    No one has replied
  • Showing Grid in TabelView

    2
    0 Votes
    2 Posts
    840 Views
    J
    Note that the table view is not really intended for spreadsheet type applications which is why I suspect you want the grid. You can easily create a grid by setting a custom itemDelegate and adding a 1 px tall rectangle at the bottom and a 1 pixel wide rectangle at the right hand corner.
  • Qmlscene: 'import QtQuick 1.0' is no longer supported.

    3
    0 Votes
    3 Posts
    3k Views
    S
    Thanks for the reply it solved my problem
  • Reseting QML file

    6
    0 Votes
    6 Posts
    2k Views
    E
    I wonder how to pass QmlApplicationViewer from main.cpp to slot?
  • What's wrong with this MouseArea logic

    7
    0 Votes
    7 Posts
    2k Views
    ?
    qttester5: Did you ever get your code to work?
  • How to make TableView Items draggable

    12
    0 Votes
    12 Posts
    7k Views
    U
    It's right there in the post that you've quoted - go to TableView.qml {just write TableView {} and control-click on it and go or whatever} and add that line at the place mentioned. That was all a month back though - now deep into the project with the kind of complexity and customization that is needed for our desktop application we are dedicating some time for building most of the stuffs from scratch - Table/Tree views inclusive.
  • How to do DnD with Qt5.1.0 QML TableView?

    1
    0 Votes
    1 Posts
    896 Views
    No one has replied
  • [SOLVED] delegate for several roles

    7
    0 Votes
    7 Posts
    7k Views
    A
    TableViewColumn provides "delegate", This can be used to set the TableView::itemDelegate for a specific column. @import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Window 2.0 import QtQuick.Controls.Styles 1.0 ApplicationWindow { title: qsTr("Hello World") width: 640 height: 480 color: "black" menuBar: MenuBar { Menu { title: qsTr("File") MenuItem { text: qsTr("Exit") onTriggered: Qt.quit(); } } } TableView { anchors.fill: parent visible: true backgroundVisible: false alternatingRowColors: false sortIndicatorVisible: true clip: true highlightOnFocus: false TableViewColumn{ role: "code" ; title: "cde" ; width: 100 delegate: Component { id: codeDelegate Text { anchors.verticalCenter: parent.verticalCenter color: "lightgray" elide: styleData.elideMode text: styleData.value font.family: "Arial" font.pixelSize: 18 } } } TableViewColumn{ role: "name" ; title: "nme" ; width: 200 delegate: Component { id: nameDelegate Text { anchors.verticalCenter: parent.verticalCenter color: "yellow" elide: styleData.elideMode text: styleData.value font.family: "Arial" font.pixelSize: 18 } } } model: ListModel { ListElement { name: "aaaaaa" code: "30426" } ListElement { name: "bbbbbb" code: "32235" } ListElement { name: "ccccccc" code: "32638" } } rowDelegate: Rectangle { property bool selected : styleData.selected width: parent.width-2 height: 30 color: styleData.selected? "black" : "black" Rectangle { width: parent.width height: 1 anchors.bottom: parent.bottom visible: parent.selected color: "yellow" } } headerDelegate: Rectangle { width: parent.width height: 30 color: "black" Text { anchors.fill: parent text: styleData.value color: "gray" font.family: "Arial" font.pixelSize: 18 } Rectangle { width: 10; height: 10 color: { if(styleData.pressed) return "red" else return "black" } } } } } @
  • How to change the display text of the button ,in quick control ?

    3
    0 Votes
    3 Posts
    1k Views
    7611534547
    thank you. i think if you that ,this is better .use "Text" Button { id: button1 x: 269 y: 99 width: 146 height:43 Text{ text: "Button" style: Text.Outline font.pointSize: 13 color:"red" anchors.centerIn: parent } }
  • How to reload the repeater's data model in QML?

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • Old Plugin System New Plugin System

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • QML alias not working

    5
    0 Votes
    5 Posts
    3k Views
    D
    if I import "Main.qml" the file will not load at all (which means it thinks there is a syntax error I think) if main.qml file does not start with a capital when you type main.mainLoader it does not recognise it as a property if Main.qml starts with 'M', when you are in the username file typing "Main." the text changes colour and you get a list of properties including the mainLoader ???? I have tried this in a small test app and I get the same results
  • Functional Qt Multimedia backend

    1
    0 Votes
    1 Posts
    777 Views
    No one has replied
  • QML and C++ interaction. Need advice

    2
    0 Votes
    2 Posts
    892 Views
    U
    Hi, I'm not sure I understood your question but if you give an id to your editors or if you know the indices of your tabs, you can call slots of your editor instances to perform specific actions in given editor. A slot is called like a javascript function: @myReference.calledFunction(args);@