GUI - architecture - Buttonbar should always stay in front



  • At present I'm developing an application for an embedded linux system with touchdisplay. In this application I need a buttonbar on the bottomside of the screen. This buttonbar should always stay in front for all of my userdialogs. For example it should work in a similiar way like the Windowsbutton in the taskbar of windows. At the moment I'm using a MdiArea with a toolbuttonbar and I'm working with MdiSubwindows to handle my menustructure. My Problem is that I'm working with minimum thirty diffrent userdialogs and it is very complex to handle all these windows and the application runs very slow. Has someone an Idea how I can realize it without Mdi-widgeds or how I can such a GUI – architecture in general.


  • Moderators

    Hi,

    Do you have drawings or screenshots of your GUI?

    Perhaps you are looking for a "QToolBar":http://qt-project.org/doc/qt-5/QToolBar.html for your buttons?

    I'm not sure how your GUI is supposed to behave, but a "QDockWidget":http://qt-project.org/doc/qt-5/qdockwidget.html is probably more suitable than a QMdiArea for embedded systems.

    Also, consider things like "QTabWidget":http://qt-project.org/doc/qt-5/qtabwidget.html or "QStackedWidget":http://qt-project.org/doc/qt-5/qstackedwidget.html to handle many windows, instead of having 30 different dialogs. 30 windows can slow your program down a lot.

    Have you looked at QToolBox or QMenuBar? They are good for managing menus.



  • Hi,

    Thank you for your rapid answer. I would post a screenshot but I've no idear how it works to upload the picture into this thread. I've added a MdiArea and a Toolbar to the MainWindow . The QToolbar consist of 6 QPushbuttons. The first one is called menu and is responsible for entering the menus which are realized with QMdiSubwindows. Because of the touchfuntionality I have to navigate through the different menulevels via QPushputtons. If a Button is pressed I am activating the corresponding Subwindow, show() it and then I remove the previous window. Maybe your suggestion with the QDockWidget could work but first I've to study the possibilities of this widget. Yes I think as well that the MdiArea needs to much memoryresources and I will try out the possibilities of the QStackedWidget.


  • Moderators

    Hi,

    [quote author="QtTommy" date="1391001856"]I would post a screenshot but I've no idear how it works to upload the picture into this thread.[/quote]You need to upload the picture to an external image host, because this forum doesn't support image uploads. After that, you can click on the "Picture" button under "Post a reply" and add your link.
    [quote]Because of the touchfuntionality I have to navigate through the different menulevels via QPushputtons. If a Button is pressed I am activating the corresponding Subwindow, show() it and then I remove the previous window.[/quote]QStackedWidget is designed for this use case. Your QToolBar can be always visible. When the user presses one of its buttons, you can change the page on the QStackedWidget.



  • Ok thank you for the information about uploading pictures.
    I think you are right. The QStacked widget fits to my needs. I think the performance problem in my application is caused by the amount of data on the heap. Thank you very much! You've helped me a lot!




  • Moderators

    You're welcome. :) Good luck with your project!

    By the way, for images, you need to provide a link to the image file, not a website.


Log in to reply
 

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