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. Open Mainwindow from a Dialog
Forum Updated to NodeBB v4.3 + New Features

Open Mainwindow from a Dialog

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 209 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.
  • C Offline
    C Offline
    chandradeo
    wrote on last edited by
    #1

    I want to accept decryption key from a Dialog which opens before launching Mainwindow. I want to know how to open a dialog before a Mainwindow opens. So that i will accept key from dialog and pass it to mainwindow variable. Please suggest.

    jsulmJ 1 Reply Last reply
    0
    • C chandradeo

      I want to accept decryption key from a Dialog which opens before launching Mainwindow. I want to know how to open a dialog before a Mainwindow opens. So that i will accept key from dialog and pass it to mainwindow variable. Please suggest.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @chandradeo Simply use QDialog::exec before you create and show main window:

      int main()
      {
          QDialog dialog();
          dialog.exec();
      
          MyMainWindow w;
          w.show();
      }
      

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      3

      • Login

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