跳到內容

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k 主題 77.2k 貼文
  • Run my exe file from outside of QtCreator

    2
    0 評價
    2 貼文
    866 瀏覽
    SGaistS
    Hi, Please take the time searching the forum. This question comes almost every week. Have a look a this well written "wiki entry":http://qt-project.org/wiki/Deploy_an_Application_on_Windows for windows deployment. You also have the "Windows Deployment Guide":http://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html
  • X and y offset on tiled images

    5
    0 評價
    5 貼文
    3k 瀏覽
    T
    Thanks, I will check it out.
  • Qml items with native look and feel

    11
    0 評價
    11 貼文
    4k 瀏覽
    J
    I solved using QApplication in the main.cpp. I used the header from the Gallery example. @ #ifndef QTQUICKCONTROLSAPPLICATION_H #define QTQUICKCONTROLSAPPLICATION_H #ifdef QT_WIDGETS_LIB #include <QtWidgets/QApplication> #else #include <QtGui/QGuiApplication> #endif QT_BEGIN_NAMESPACE #ifdef QT_WIDGETS_LIB #define QtQuickControlsApplication QApplication #else #define QtQuickControlsApplication QGuiApplication #endif QT_END_NAMESPACE #endif // QTQUICKCONTROLSAPPLICATION_H @ and in the main.cpp @ QtQuickControlsApplication app(argc, argv); @ I also added this line in the .pro file @ !android: !ios: !blackberry: qtHaveModule(widgets): QT += widgets @ But they are not actually needed :) Thanks for the help guys!!
  • [Solved] ListView: How to get snapped item when snaps occur?

    9
    0 評價
    9 貼文
    3k 瀏覽
    B
    Sorry, I forgot to do that :D
  • Is there a widget to draw a function ?

    5
    0 評價
    5 貼文
    1k 瀏覽
    A
    Hi, that what i thought i will have to do it by myself or use qwt. Thanks for your answers
  • Qwidgets in QML

    11
    0 評價
    11 貼文
    13k 瀏覽
    D
    That's it http://developer.blackberry.com/native/documentation/cascades/dev/integrating_cpp_qml/
  • Clear an Array? how to clear array

    3
    0 評價
    3 貼文
    3k 瀏覽
    S
    Dynamic array is from STL or Qt?
  • [SOLVED] Qt Quick designer crash Qt Creator

    8
    0 評價
    8 貼文
    7k 瀏覽
    sierdzioS
    This is understandable - QtQuick 1 and 2 are completely separate beasts and require different designer rendering helpers.
  • How to import 3rd party js lib to qml

    3
    0 評價
    3 貼文
    2k 瀏覽
    M
    Tnx a lot 4 answer! ok, but my app will be run at mac os, etc, where Android API will not be available, and what next? About C++ version, i think i can't use is so maybe some one know other libs or some service or something other solutions?
  • Qml image sub region (spritesheet) but with centered image

    2
    0 評價
    2 貼文
    882 瀏覽
    S
    went image provider route, seems the best/only real way. ( i also needed some resizing code for when the source is larger than the element, to downsize it
  • [SOLVED] Qt 5.3 and QtQuick 1.1

    7
    0 評價
    7 貼文
    4k 瀏覽
    sierdzioS
    [quote author="MrBolton" date="1400665764"]But I'm still wondering: Does the QQuickWidget not support QtQuick 1 at all?[/quote] Correct. It does not need to (plus, QtQuick 1 is deprecated in Qt 5).
  • QT4.8.4 : QtQuick 1.1 : images ressource management

    4
    0 評價
    4 貼文
    1k 瀏覽
    sierdzioS
    Nice, so now we know for sure :-)
  • What do I have to write on the QML Video source property in order to show rtsp ?

    7
    0 評價
    7 貼文
    2k 瀏覽
    A
    I have gstreamer-0.10 and its plugins on my machine. When I run the gstreamer from shell I can see the rtsp streaming.
  • How to access C++ type from JavaScript code?

    3
    0 評價
    3 貼文
    1k 瀏覽
    L
    First of all, below shows how to instantiate your cpp objects in qml @ import my.app.MyQObject 1.0 item { MyQObject { id:obj } } @ I thought Object.create will work, but no. Second, in QML apparently your MyQObject, as well as other QML elements all have type of object. it doesn't even have prototype.. so it behaves sortof like a builtin object If you need reflection, check objectName property. Any exported QObject will have that property by default. This seems the case since Qt 5.0 So instead of typeof(obj), use obj["objectName"]
  • QML never complains about non-existent property in Binding

    3
    0 評價
    3 貼文
    1k 瀏覽
    F
    Thanks lack! Your example about JavaScript behavior is reasonable. I use Binding to update C++ properties automatically. In my example, puppy is actually a C++ object while input is a Qt Quick TextField. Whenever input.text changes, QML will call puppy.name's WRITE method, e.g. setName(input.text). But if name was mispelled, QML will have nothing to call and in my opinion should output a warning, just like when Qt complains about a non-existent signal/slot.
  • 0 評價
    2 貼文
    1k 瀏覽
    V
    jhonjhon, você tem de perguntar em inglês.. As perguntas em português podem ser feitas aqui: http://qt-project.org/groups/qt_brazil
  • 0 評價
    9 貼文
    2k 瀏覽
    D
    See this post: http://qt-project.org/forums/viewthread/42799/ Maybe there is more, but I stopped using 5.3 frustrated ^^
  • Playing video and showing images with xmllistmodel and listview

    1
    0 評價
    1 貼文
    586 瀏覽
    尚無回覆
  • QAtan2 result is always one

    4
    0 評價
    4 貼文
    1k 瀏覽
    M
    No all code; only the part where you use qAtan2. Anyway i suggest to use qDebug to print Input/Output parameters of qAtan2
  • Implementation of TouchArea using TUIO API for QML application

    4
    0 評價
    4 貼文
    2k 瀏覽
    S
    Conclusion: Hello, I am implementing a TUIO API interface for multiple touch screen able to touch several touch screen simultaneously. It is working! 0./ I add a modiffication into: qapplication_p.h @public: //Add a filter to completely ignore touch event if they do not match the pressure value //only when touchEventPressurFilter>0 !! static qreal touchEventPressurFilter;@ and also into gui\kern@el\qapplication.cpp so the methode translateRawTouchEvent can ignore touch event based on a pressure value @//Add a filter to completely ignore touch event if they do not match the pressure value //only when touchEventPressurFilter>0 !! qreal QApplicationPrivate::touchEventPressurFilter = -1;@ @void QApplicationPrivate::translateRawTouchEvent(QWidget *window, QTouchEvent::DeviceType deviceType, const QListQTouchEvent::TouchPoint &touchPoints) { QApplicationPrivate *d = self; typedef QPair<Qt::TouchPointStates, QListQTouchEvent::TouchPoint > StatesAndTouchPoints; QHash<QWidget *, StatesAndTouchPoints> widgetsNeedingEvents; //TestTuio if(touchEventPressurFilter>=0) for (int i = 0; i < touchPoints.count(); ++i) { QTouchEvent::TouchPoint touchPoint = touchPoints.at(i); if(touchPoint.pressure()!=touchEventPressurFilter) { //qDebug()<< "Ignore WM_TOUCH Events: filter on pressure value: "<<touchPoint.pressure()<< touchEventPressurFilter; return; } }@ 1./ I have several instance of a class : @class SdcnTUIOApplicationViewer : public QDeclarativeView, TUIO::TuioListener@ 2./ Only one instance is listening the TUIO UDP frames All instance are child of a static global background widget, setparent() is called during initialisation: The filter/pressure value is also set once during initialisation of one of the ApplicationViewer instance @ //GlobalWidget use for multitouch if(globalWidget==NULL) { //globalWidget Must fill the virtual desktop globalWidget = new SdcnBackgroundWidget( 0, Qt::Tool|Qt::FramelessWindowHint ); //Set geometry instead of maximized ! ((QWidget*)globalWidget)->setGeometry(0,0,mGlobalVirtualScreenWidth,mGlobalVirtualScreenHeight); globalWidget->m_initialSize.setWidth( mGlobalVirtualScreenWidth ); globalWidget->m_initialSize.setHeight( mGlobalVirtualScreenHeight ); ((QWidget*)globalWidget)->setVisible(true); //Set the background color of the globalwidget ((QWidget*)globalWidget)->setStyleSheet("* { background-color: rgb(50, 50, 50); }"); this->setParent(globalWidget); //Main application : QApplicationPrivate *qAppPriv = QApplicationPrivate::instance(); //Set pressure filter value to ignore system nativ touch events qAppPriv->touchEventPressurFilter=TUIO_PRESSURE_VALUE; } else this->setParent(globalWidget);@ 3./ The translateRawTouchEvent methode is then alled on the top most widget of the application (even detached popup) @ //Main application : QApplicationPrivate *qAppPriv = QApplicationPrivate::instance(); //Get the topest widget, even Detached popup windows: QWidget* lToplevelWidget= QApplication::topLevelAt(QPoint(posInScreen.x(), posInScreen.y())); qAppPriv->translateRawTouchEvent(lToplevelWidget,QTouchEvent::TouchScreen,touchPointsList);@