Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.4k Posts
  • Changing the text indent within a TextArea

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Items in the Grid component that are not Rectangle

    3
    0 Votes
    3 Posts
    1k Views
    S
    Oh, got it. Yeah I use different names in my actual code, I just tried to keep it similar. Thanks Jens!
  • [SOLVED]Qt Quick and QML Image Zoom

    2
    0 Votes
    2 Posts
    7k Views
    W
    Solved by : @ MouseArea { anchors.fill: parent; onClicked: { if(transformY > -((visibleImg.height/2 - (visibleImg.height-visibleImg.paintedHeight)/2)(visibleImg.scale-1)) + visibleImg.scale10) transformY -= visibleImg.scale10; else transformY = -(visibleImg.height/2 - (visibleImg.height-visibleImg.paintedHeight)/2)(visibleImg.scale-1); } } @ Resp. with +/- and X/Y on the appropriate directions.
  • [Solved] QPalette and SystemPalette

    3
    0 Votes
    3 Posts
    2k Views
    S
    I knew it was something that simple. Thanks for pointing it out!
  • Pinch Area with a VisualDataModel[SOLVED]

    2
    0 Votes
    2 Posts
    1k Views
    G
    The problem was so obvious... Just replace : pinch.target: logo by the appropriate item
  • Using Command prompt commands

    5
    0 Votes
    5 Posts
    2k Views
    A
    thank you Mr.Tobias Hunger....I have already tried....It doesn't worked,thats why i'm trying for some other solution like Command Prompt via Qt....Could you display some example how to send mail in Qt using Command prompt commands(Like you said that One server to server)
  • Qt Quick Training In Bangalore

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Could I use QWidget and qml together?

    3
    0 Votes
    3 Posts
    1k Views
    S
    [quote author="sierdzio" date="1372838349"]See "this blog post":http://blog.qt.digia.com/blog/2013/06/21/overview-of-the-new-features-in-qt-quick/?utm_source=rss&utm_medium=rss&utm_campaign=overview-of-the-new-features-in-qt-quick, especially "Exposing the text document to C++".[/quote] Thanks, I try the example, but looks like it do not support QTextBrowser yet Do QTextDocument support the hyperlink in html? Not just make the text "rich" but also redirect the page to the specific location(local or network)
  • Highlight problem for ListView entry when button pressed

    6
    0 Votes
    6 Posts
    6k Views
    M
    I am having the same kind of problem, did you or anyone else find a solution to this problem in the meanwhile? Thanks in advance
  • QtQuick2 under Winpe/Winre

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • How to use Versit from QML ?

    1
    0 Votes
    1 Posts
    567 Views
    No one has replied
  • [Solved] Wanted: QQuickImageProvider examples

    7
    0 Votes
    7 Posts
    14k Views
    Z
    Okay, I solved it by using random numbers in my id's. Seems like he is only updating via requestPixmap when the id has changed.
  • Redraw function by using canvas

    2
    0 Votes
    2 Posts
    1k Views
    P
    You can use "Timer":http://qt-project.org/doc/qt-4.8/qml-timer.html to trigger "requestPaint":http://qt-project.org/doc/qt-5.0/qtquick/qml-qtquick2-canvas.html#requestPaint-method or "markDirty":http://qt-project.org/doc/qt-5.0/qtquick/qml-qtquick2-canvas.html#markDirty-method Canvas methods every second
  • QODBC in QML? Not Able to find tables

    5
    0 Votes
    5 Posts
    3k Views
    B
    [quote author="shullw" date="1314391681"]I am currently trying to make a few simple queries through js in a qml file. I am working on a Windows XP machine where I have an ODBC connection to an Oracle RDB. In my main.cpp I was able to figure out how to get connected to the database but the connection doesn't seem to be reachable in my knowledge in the QML file. This is what I have so far. main.cpp @ #define DB_DRIVER "QODBC" // you need to replace the following macros with the values relevant to // your DSN. // DB_DBNAME = the name of the DSN. #define DB_DBNAME "level2dave" // DB_USER = a username valid for your database #define DB_USER "" // DB_PASSWD = password for DB_USER #define DB_PASSWD "" // DB_HOST is not relevant to DSNs #define DB_HOST "" QSqlDatabase level2 = QSqlDatabase::addDatabase(DB_DRIVER); level2.setDatabaseName(DB_DBNAME); level2.setUserName(DB_USER); level2.setPassword(DB_PASSWD); level2.setHostName(DB_HOST); if (!level2.open()) { QMessageBox::critical(0, qApp->tr("Cannot open database"), qApp->tr("Unable to establish a database connection.\n" "Click Cancel to exit."), QMessageBox::Cancel); return false; } @ I am 99% sure this is working because I don't get the QMessageBox anymore. That took a good long while, but now over in the qml file it seems that I can't get access to the database that I just linked to. This what I have there. @ function linkthedb() { var level2 = openDatabaseSync("level2", "1.0", "ODBC Connect", 10000000000000); level2.transaction( function(tx) { // Show all var rs = tx.executeSql('SELECT * FROM knowntable'); } ) } @ When I run all of this it just tells me the knowntable is not there. I know it is. I must not be really connecting to the database in the qml file. I thought that the addDatabase would put the ODBC database on the same level as the SqLite ones that are on the device. If anyone can help I would love a hand.[/quote] you will need to provide bridge in C++
  • Heap Corruption when using desktop components

    4
    0 Votes
    4 Posts
    2k Views
    S
    [quote author="steno" date="1372809062"]I used the examples given from Qt. I used the visual studio plugin to open a pro file and then compiled and ran. The examples cause a heap corruption in vs2010 for me; however, in QtCreator it seems to work fine.[/quote] I don't know vs series(vs2010, 12 and so on) very well, since the project work fine under QtCreator, then I would guess that the problem maybe is lying in your make file.
  • LocalStorage

    8
    0 Votes
    8 Posts
    3k Views
    D
    Sorry I can't use C++ for this project. on my mac. the localstorage db is located in a hidden folder. @ /Library /Application Support /Qt Project /QTQmlViewer /QML /OfflineStorage /Databases @ This seems mental to me. Why can't I just have it in my project folder like @ /Desktop /qml_projects /test_project @
  • Blinking QML animation on slow computer

    2
    0 Votes
    2 Posts
    2k Views
    B
    Almost looks like a double buffering issue, but not so sure, since the flickering screen seems to be an entire white screen in your case... Bill
  • How to convert QVariant(CustomType *) to CustomType*

    5
    0 Votes
    5 Posts
    2k Views
    M
    hmm.. but when i write the typeof my variant object, it will write on log screen "QVariant(CustomObject*)" im using @console.log(myVariantObj["KEY"])@ The result is @QVariant(CustomType*)@
  • 0 Votes
    3 Posts
    6k Views
    S
    Thanks, I found another solution @ if(layoutLoader.status == Loader.Ready && filesModel.count != 0){ return filesModel.get(layoutLoader.item.currentRow).source //return filesModel.get(tableView.currentRow).source } @ Check the number of the ListModel before query the source The filesModel can't find property source because I haven't insert anything into it edit : add one more condition "layoutLoader.item.currentRow != -1", else it would emit error message when you do not select any image
  • QTestlib in qtbase doesn't work properly.

    4
    0 Votes
    4 Posts
    2k Views
    JKSHJ
    Exceptions can cause stack corruption. Your code is executing the wrong function, which sounds like stack corruption. Can you post the code of the method that throws the exception? Also, if you throw your own exceptions, you should always catch them. Unhandled exceptions are nasty. Anyway, Qt Test is designed to mark pass/fail only by checking boolean results in QCOMPARE() and QVERIFY() -- it doesn't check exceptions. So, if you want to generate negative test cases, you need to catch your exception and then report that the expected exception was caught.