Starting with Qt; Few queries



  • Hi Community!!
    I have to develop a UI Configuration Utility in Qt which helps in setting some parameters in a touch panel system. Eventually, this application talks to a customized driver too. This is needed for Windows. I have a fair exposure to C++ but am very much new to Qt. I have some relevant queries with regard to developing in Qt. I hope you will provide me guidance so that I can join you all, the Qt Community!
    *1) *Which flavour of Qt should I download: Qt with MinGW or Qt add-in to Visual Studio?? Why do we need MinGW??
    *2) *Is QtWidgets all right for my requirements?? I found a comparison table at "This Link":https://qt-project.org/doc/qt-5.0/qtdoc/topics-ui.html which says that "In contrast to Qt Quick, the widgets do not scale that well for touch screens". I cann't go with Qt Quick as I have only worked on C, not on QML/JS :(
    Pls suggest

    Thanks


  • Moderators

    @1:
    These are 2 different pair of shoes. "Qt with MinGW" comes with binaries already compiled with MingW compiler. Where the VS addin is only a plugin for Visual Studio to assist your development in visual studio. Thus you will use the visual studio compiler. It shouldn't make a big difference for you. Choose MingW if you want to develop with QtCreator, choose the binaries and the VS addin if you want to develop with Visual Studio.

    @2:
    You should be fine with QtWidgets ... so QML is not mandatory. Actually is a completely different architecture. I prefer coding in C++ (QtWidgets) because i have full control over the implementation. QML i would use for rapid development of simple and or mobile application. But you must decide this for yourself, considering the complexity of your application and the learning effort needed to learn QML.



  • Raven,
    Thanks a lot for responding.
    #1) Is there any difference in development using Qt Creator or Visual Studio except the IDE??

    #2) My application will be a desktop application. Adding on, I have not enough time to put in learning QML. Rather, I can use my C++ basic knowledge to proceed with QtWidgets. What do u say??


  • Moderators

    [quote author="deepak_" date="1369388945"]Raven,
    Thanks a lot for responding.
    #1) Is there any difference in development using Qt Creator or Visual Studio except the IDE??

    #2) My application will be a desktop application. Adding on, I have not enough time to put in learning QML. Rather, I can use my C++ basic knowledge to proceed with QtWidgets. What do u say??[/quote]

    Both compilers are quite horrible, so the answer is no. MinGw likes to break occasionally. You can use MSVC version of Qt together with Qt Creator, so the choice is a bit broader than raven-worx suggested.

    QtWidgets is still valid and very (most) popular way of developing apps in Qt.


  • Moderators

    [quote author="sierdzio" date="1369389147"]
    You can use MSVC version of Qt together with Qt Creator, so the choice is a bit broader than raven-worx suggested.[/quote]
    yea right ... forgot that.



  • Sierdzio,
    Thanks for your verdict. So, I'll download "Qt 5.0.2 for Windows 32-bit (VS 2010, 485 MB)". Should this be fine?

    One more Question: The application will run on machines having "TOUCH SCREENS". Does Qt Widgets support Touch Inputs?? Or would I need to move on to Qt Quick??
    Plz see "This Comparison Table":https://qt-project.org/doc/qt-5.0/qtdoc/topics-ui.html for reference regarding Touch Screen Support.
    Thanks for your time


  • Moderators

    Qt has since 4.6 touch support (QML was introduced with 4.7 if i remember right) so touch support was even there before QtDeclarative module appeared.

    "QTouchEvent class":http://qt-project.org/doc/qt-5.0/qtgui/qtouchevent.html is implemented in the QtGui module which both QML and QtWidgets module depend on.
    The comparison table just says that some widgets are just not designed for touch events. It may be necessary to implement some code to interpret the touch events for some(?) widgets to make them behave like you want.


  • Moderators

    So basic things like clicking, double clicking and dragging should work with widgets. Gestures are - AFAIK - available in QML, but not so much in Widgets (I have not tested that, though).


  • Moderators

    hmm... "gesture":http://qt-project.org/doc/qt-5.0/qtwidgets/qgestureevent.html support for QtWidgets seems promising.
    There is a "Qt Guide":http://qt-project.org/doc/qt-5.0/qtwidgets/gestures-overview.html how to work with gestures on widgets.



  • Thanks Sierdzio and Raven!

    We need only these basic functions of click, double click only. I think even "drag" won't be needed.
    Should I take up your comment as "My UI app developed with QtWidgets will support Click and Double Click Events??"


  • Moderators

    Yes. Probably even with multitouch if your screen supports that. Can't say for sure, I've only seen QtWidgets used on a touch screen (Qt for Android supports widgets and QML after all), Myself, I've only used QML with touch screens.


  • Moderators

    From the QTouchEvent docs:
    [quote]
    By default, QGuiApplication translates the first touch point in a QTouchEvent into a QMouseEvent.
    [/quote]

    there shouldn't even be any extra work to do in your case.



  • Sierdzio and Raven,
    Thanks a lot for your time!!
    I've started up with Qt.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.