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. Popup widget before mainwindow appears
Forum Updated to NodeBB v4.3 + New Features

Popup widget before mainwindow appears

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 1.0k Views 1 Watching
  • 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.
  • saitejS Offline
    saitejS Offline
    saitej
    wrote on last edited by
    #1

    how to Popup a widget before the main window appears (something like a login widget) but I need that instantiated class to be accessed in mainwindow.

    Like I have Connect widget that should pop up before the mainwindow and the instance of the Connect widget that has popped should be accessed in the mainwindow.

    Any suggestion on how this should be done will be very helpful.

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      Hi
      You can just make it live in
      mainwindow but show in main.

      #include <logindialog.h>
      
      int main(int argc, char* argv[]) {
        QApplication a(argc, argv);
        MainWindow w;
        w.login = new LoginDialog(&w); // setLogin( new LoginDialog ) // would be nicer 
        w.login ->exec();// show login
        w.show();
        return a.exec();
      }
      
      

      runable project:
      https://www.dropbox.com/s/r5c9bna4mjw1zlt/mylogin.zip?dl=0

      1 Reply Last reply
      2
      • saitejS Offline
        saitejS Offline
        saitej
        wrote on last edited by
        #3

        Thanks. It works

        A 1 Reply Last reply
        0
        • saitejS saitej

          Thanks. It works

          A Offline
          A Offline
          aliks-os
          wrote on last edited by
          #4

          @saitej
          Please mark that issue is solved

          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