Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.3k Posts
  • Basic Form Layout for Symbian in QML

    8
    0 Votes
    8 Posts
    4k Views
    R
    Sorry for the triple post, but I just figured out that setting contentHeight to contentItem.childrenRect.height actually fixed all of my problems! Thanks everyone!
  • Xml array data problem.

    1
    0 Votes
    1 Posts
    947 Views
    No one has replied
  • QML state changes on double click

    3
    0 Votes
    3 Posts
    5k Views
    C
    The reason is that "doubleClicked" is a signal, not a property. The "when" property of a State, is of type Binding which expects the result of the binding expression to be boolean.
  • MouseArea pressedButtons

    5
    0 Votes
    5 Posts
    2k Views
    G
    pressedButtons & Qt.LeftButton don't work too but in a different way. It stay true after releasing right mouse button but then releasing left button it is not reset. Bugreport here https://bugreports.qt-project.org/browse/QTBUG-26458
  • How to Hide Window flags in qt Quick?

    5
    0 Votes
    5 Posts
    4k Views
    A
    Right it's work! thanks a lot
  • SQlite database problem in qml

    2
    0 Votes
    2 Posts
    3k Views
    D
    Update: Now i solved this warning: QSqlDatabasePrivate::removeDatabase: connection ‘qt_sql_default_connection’ is still in use, all queries will cease to work.(when exiting). But still I have: error no such table
  • QML tabButton styling

    3
    0 Votes
    3 Posts
    5k Views
    M
    Looking at the TabButton.qml source can give some insights into how TabButton works. For instancs, from what I can tell in the version that I have handy (4.7.4 Desktop source tree in the SDK), there's a component called internal which encapsulates most of the component's magic. Inside there, it looks like there's a BorderImage called background which is the normal background image for the button. There's also one called pressedGraphics which is normally transparent, but which is made opaque during the button press to give the button a highlight. You may be able to drop in your own graphics by using something like: @ yourTabButton.internal.background.source = "url to your background image"; yourTabButton.internal.pressedGraphics.source = "url to your pressed image"; @ However, I haven't tried this (and it does break the bit of encapsulation there is and most likely would be considered by some to be naughty -- in the event that the internal implementation is different across platforms or versions or whatnot.) So YMMV and use at your own risk. Anyway, as I said before, you can get always get more definitive information from looking at the source code. At worst, it can give you an idea of how you might implement your own version of a TabButton which does exactly what you want... within licensing restrictions, etc., of course (IANAL).
  • [SOLVED]anchors.CenterIn and anchors.horizontalCenter can't work

    7
    0 Votes
    7 Posts
    16k Views
    R
    Just add [SOLVED] in the title [quote author="stereomatching" date="1341476563"]Sorry, how could I mark this thread as "solved"?[/quote]
  • Why wrap an inline delegate in a Component?

    4
    0 Votes
    4 Posts
    2k Views
    L
    Thanks! I assumed it was something like that, but couldn't quite understand the details. Now I do.
  • Third part library: Wrapping a QWidget

    3
    0 Votes
    3 Posts
    3k Views
    F
    You might want to explain, why you want to mix three approaches for the frame to be displayed. What is the reason why you want to use QWdiget at all, since you are not using any qt code to get the frame displayed but programmed it yourself again in the resize event?
  • [SOLVED] listview with 2 models and back button

    3
    0 Votes
    3 Posts
    3k Views
    B
    I'm trying to implement someting similar with nested menus and have not found much. Can you post the basic qml needed to implement this? Thanks!
  • Enter and Leave events using QQuickItem

    9
    0 Votes
    9 Posts
    5k Views
    A
    Could you post a link to the bugreport please?
  • Key.onReturnedPressed not emitted in TextArea

    5
    0 Votes
    5 Posts
    2k Views
    C
    Just a quick note: I believe that Return and Enter have different events. It's worth double checking that the EnterPressed event isn't being received instead of ReturnPressed.
  • Share enum between C++ and QML / header file

    3
    0 Votes
    3 Posts
    12k Views
    B
    found an ugly workaround too: declared a QObject class in my enum header file like this: @ myFile.h class MyEnum: public QObject { Q_OBJECT Q_ENUMS(someEnum) pubilc: enum someEnum {A, B, C} } typedef MyEnum::someEnum t_someEnum; In some C++ file that requires this enum type cppFile.h #include myFile.h class SomeClass { public: t_someEnum mEnum; } when defining a method requiring one of the value use mEnum = MyEnum::A; In the C++ files that will register the qml enum, simply include the myFile in the header file MyClass.h, in the constructor register the enum for qml with qmlRegisterType<..>("...",1,0,"QMLENUM") Now use the enum values A, B, C directly in QML by calling QMLENUM.A for instance. @
  • Static QML screen size

    2
    0 Votes
    2 Posts
    2k Views
    L
    I guess this depends on how you run your Qt Quick application, and possibly also what target you are building it for and running it on. If you have access to the declarative view showing your QML it should be fairly easy to either Set the size of the declarative view and make sure its resize mode is set to QDeclarativeView::SizeRootObjectToView or Set the size of your top QML element and make sure the view's resize mode is set to QDeclarativeView::SizeViewToRootObject
  • Arranging items in GridView

    4
    0 Votes
    4 Posts
    2k Views
    U
    @ import QtQuick 1.0 Rectangle { id: main width: 640 height: 360 Grid { id: grid rows: 5 columns: 3 flow: Grid.TopToBottom Repeater { id: repeater model: grid.rows*grid.columns Rectangle { width: 50 height: 50 color: "transparent" border.color: "blue" border.width: 2 Text { id: text text: index anchors.centerIn: parent } } } } } @ you can use this code to arrange the items column wise. i just set the "flow" property of grid, as Mr. Ludde said in the comment [Edit: Added @ tags for code formatting. Please be sure to use them in the future! -- mlong]
  • Qt Quick Components Not a type

    5
    0 Votes
    5 Posts
    3k Views
    B
    Thanks! I thought I'd tried that but I guessed I messed up the syntax
  • TabBar and different Toolbar for each tab

    3
    0 Votes
    3 Posts
    2k Views
    D
    Hi i'm new to qml so i can't help you but maybe this link may help you "Link":http://projects.developer.nokia.com/uivisualisation This is a nokia developer project which demonstrate the proper use of UI elements in qml. Download the source code, open the project and go in the toolbars folder. Here you will find an example that changes toolbars dynamically by clicking different buttons. I think you can do same things with tab button as both they have "clicked" signal. Hope this help. :) [edit: fixed link, Eddy]
  • Sqlite db SIS package

    1
    0 Votes
    1 Posts
    892 Views
    No one has replied
  • Highlight of an ListView

    3
    0 Votes
    3 Posts
    1k Views
    ?
    It works, Thank you very much.