Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.3k Posts
  • 0 Votes
    9 Posts
    2k Views
    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 Votes
    1 Posts
    587 Views
    No one has replied
  • QAtan2 result is always one

    4
    0 Votes
    4 Posts
    1k Views
    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 Votes
    4 Posts
    2k Views
    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);@
  • QML video element could not read from resource

    2
    0 Votes
    2 Posts
    2k Views
    A
    Don't you need to add port to the rtsp source ?
  • 0 Votes
    3 Posts
    809 Views
    L
    second, that database name doesn't look correct. the only db driver that needs file path is sqlite. third, no user name.
  • My TableView Doesn't work

    12
    0 Votes
    12 Posts
    4k Views
    L
    What have you tried and doesn't work? We need more information. 'Doesn't work' is not helpful. If you have read the article, right at the end he showed a generic class extending QSqlQueryModel that is usable from QML. I tested it against Qt 5.2, and yes it does work. Granted, with little work as QAbstractItemModel::setRoleNames was deprecated, you have to reimplement QAbstractItemModel::roleNames instead, but that is 1 minute work.
  • QML: superscript/subscript text

    4
    0 Votes
    4 Posts
    3k Views
    SGaistS
    Hi, They don't but Qt is big and the developer teams have only so many members. However, you can help getting the bug fixed by voting for it and make it known that it's still an issue in the latest version.
  • How to add integers into array

    4
    0 Votes
    4 Posts
    3k Views
    SGaistS
    Then you should first get yourself familiar with c++ and Qt before rushing the port. Start by a small simple function and don't forget to add tests to ensure your code is working properly. On a side note, it's Qt, QT stands for Apple QuickTime
  • Swipe Gesture with Qt Quick 2.0 and Qt 5.2

    6
    0 Votes
    6 Posts
    6k Views
    D
    Thanks for your reply, going to try it :)
  • QQuickWidget and TextInput or TextField not working in Qt 5.3.0 RC

    2
    0 Votes
    2 Posts
    945 Views
    A
    Nobody some hint? Can someone ackknowledge that TextInput in QQuickWidget QT5.3.0 RC is working?
  • [Solved] Code editor using QML

    8
    0 Votes
    8 Posts
    7k Views
    Q
    Thanks. That's all very interesting, appreciate the info.
  • Performance rendering performance in QML SequentialAnimation

    2
    0 Votes
    2 Posts
    1k Views
    S
    Hi, I looked into it but I could not really figure out how the animations are managed. Maybe anohter strategy would be to aim ata lower level in QT. Is there a way to set the maximum rendering frame rate? Which reduce the computation ressource?
  • 0 Votes
    10 Posts
    3k Views
    A
    Seems that the issues are fixed in qt 5.3 alpha/beta
  • Drag a copy of an item to Droparea

    7
    0 Votes
    7 Posts
    5k Views
    M
    Thank you I will take a look and try to figure it out. Thank you again.
  • How to rotate and change location of a png in GraphicsView

    1
    0 Votes
    1 Posts
    561 Views
    No one has replied
  • 0 Votes
    4 Posts
    3k Views
    T
    I should also note that the window itself does show, and any components (such as a text area) I put in it will show as well, just not the menu bar. In case it makes a difference I'm on Ubuntu 14.04
  • Increase sampling rate ( interp(); function in MATLAB )

    2
    0 Votes
    2 Posts
    2k Views
    JKSHJ
    Hi, Qt does not offer advanced mathematical functions. You have 3 options (from simplest to hardest): Interpolate your data in MATLAB before passing it to Qt Link your Qt project to a mathematical library like "GSL":http://www.gnu.org/software/gsl/ "Write your own interpolation functions":http://books.google.com/books?id=gwijz-OyIYEC&pg=PA36&dq=interpolation
  • How to preserve TextField binding when user manually edits value

    3
    0 Votes
    3 Posts
    1k Views
    R
    That's exactly what I was looking for. I still don't understand why the binding is lost, but I'm really after the correct way of coding QML and using an alias is much simpler than what I was doing. In fact in my actual code I will create an alias to each top level item (i.e TextField and similar objects) and that way the user of the component can have access to anything they want. Thank you very much.
  • How to get HID device and interact with the hid device

    1
    0 Votes
    1 Posts
    740 Views
    No one has replied