Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] Qt Popup and C++/QML Application
QtWS25 Last Chance

[Solved] Qt Popup and C++/QML Application

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    Wroman
    wrote on last edited by
    #1

    Hello,

    i'm unsure of where to post this but hey, having a try here.

    I'm currently developing a GUI in cpp/QML.

    I got a HMI Manager which is a QObject for the managing of the signals and the communication with the rest of the app and qml files for the Graphical part and managing actions from the user. The cpp creates the QQuickView and loads the qml at init and connect signals and all this.

    At that point, no problem.

    I just want to display a pop-up to make some kind of authentification (secured mode to control a camera rotation, etc) and I'm wondering where to create the pop-up.

    As a dynamically created QML object or in the Manager with sort of QMessageBox ( solution i tried and it asks me that i can't make QWidgets without QApplication, I got a QGuiApplication thought.) ?

    What's the best practice and what's possible to do ?

    Trust me, i'm an engineer !

    1 Reply Last reply
    0
    • B Offline
      B Offline
      b1gsnak3
      wrote on last edited by
      #2

      Well... QMessageBox is part of QtWidgets module and documentation states that for QWidget based Qt applications you should use QApplication because it provides "some" functionality needed for creating QWidget instances. Therefore you need QApplication for QMessageBox. You should use QApplication for all your GUI based applications as you will be probably be needing to add QWidgets or other derived classes.

      1 Reply Last reply
      0
      • W Offline
        W Offline
        Wroman
        wrote on last edited by
        #3

        You're right, i'm a bit tired. Misread the docs before posting.

        Thanks !

        Trust me, i'm an engineer !

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved