What to use?



  • I am not sure which to use. Do I want to go with a qt console application or qt quick application. I am trying to make an application where I can drag and drop in spheres or cubes from one panel to another.


  • Moderators

    Hi,

    A console application cannot display draggable spheres and cubes :)

    I recommend Qt Quick.



  • Well, there are several ways to do this. You can use QWidgets, QGraphics or QML for that. I can't say what is better for you (not enough information about your project and your skills).
    "Drag and Drop Examples":http://qt-project.org/doc/qt-5/examples-draganddrop.html
    "Qt Quick Examples - Drag and Drop":http://qt-project.org/doc/qt-5/qtquick-draganddrop-example.html



  • What I am trying to create is a level editor for a game I am making. I wanted to start off by making the core of the application the design field, and the base objects of spheres and cubes.



  • @mmcdon15
    I just started working on the SAME project, and I am using QWidgets. Qt 5.3 has the QWindow framework, which I understand as recommended if you are going to interface directly with OpenGL to render on a screen.

    To those of you who know Qt 5.3 better, is that a feasible approach? Would I still be able to drag objects drawn on the QWindow?


  • Moderators

    [quote author="Ferobles92" date="1403893158"]@mmcdon15
    I just started working on the SAME project, and I am using QWidgets. Qt 5.3 has the QWindow framework, which I understand as recommended if you are going to interface directly with OpenGL to render on a screen.

    To those of you who know Qt 5.3 better, is that a feasible approach? Would I still be able to drag objects drawn on the QWindow?[/quote]Hi, and welcome to the Qt Dev Net!

    If you want to write your own OpenGL rendering code, then yes QWindow is the best choice for displaying. Note that you will also need to implement low-level mouse handling for drag-and-drop support. See the "QWindow documentation":http://qt-project.org/doc/qt-5/qwindow.html and pay attention to functions like mousePressEvent().

    Still, I encourage you to read the links that qxoz posted to see if other solutions meet your needs. If you don't need to write custom OpenGL code, the others are easier than QWindow.


Log in to reply
 

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