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. what window flag to set for qdialogbox?
Forum Updated to NodeBB v4.3 + New Features

what window flag to set for qdialogbox?

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 470 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.
  • R Offline
    R Offline
    rafael
    wrote on last edited by
    #1

    I have two monitors. the first one displays properly, the second one doesn't have the minimize, maximize, and close buttons.
    What flag do i need to set, so that the dialogbox would be display the same on both screens upon creation?

    ChartDialog *dlg = new ChartDialog();
    
        Qt::WindowFlags flags = 0;
        flags |= Qt::WindowMaximizeButtonHint;
        flags |= Qt::WindowContextHelpButtonHint;
        flags |= Qt::WindowMinimizeButtonHint;
        flags |= Qt::WindowCloseButtonHint;
    
        dlg->setWindowFlags(flags);
        dlg->setWindowTitle("Chart Dialog");
        dlg->show();
    

    chart.png

    chart2.png

    jsulmJ 1 Reply Last reply
    0
    • R rafael

      I have two monitors. the first one displays properly, the second one doesn't have the minimize, maximize, and close buttons.
      What flag do i need to set, so that the dialogbox would be display the same on both screens upon creation?

      ChartDialog *dlg = new ChartDialog();
      
          Qt::WindowFlags flags = 0;
          flags |= Qt::WindowMaximizeButtonHint;
          flags |= Qt::WindowContextHelpButtonHint;
          flags |= Qt::WindowMinimizeButtonHint;
          flags |= Qt::WindowCloseButtonHint;
      
          dlg->setWindowFlags(flags);
          dlg->setWindowTitle("Chart Dialog");
          dlg->show();
      

      chart.png

      chart2.png

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

      @rafael said in what window flag to set for qdialogbox?:

      I have two monitors. the first one displays properly, the second one doesn't have the minimize, maximize, and close buttons.

      Do you mean on one monitor your dialog has these buttons and on another monitor it does not?
      Or is this: "I have two monitors" a mistake and you mean dialogs and not monitors?

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

      R 1 Reply Last reply
      0
      • jsulmJ jsulm

        @rafael said in what window flag to set for qdialogbox?:

        I have two monitors. the first one displays properly, the second one doesn't have the minimize, maximize, and close buttons.

        Do you mean on one monitor your dialog has these buttons and on another monitor it does not?
        Or is this: "I have two monitors" a mistake and you mean dialogs and not monitors?

        R Offline
        R Offline
        rafael
        wrote on last edited by
        #3

        @jsulm i have a desktop with dual output, only one dialog box gets created at a time. When i generate the dialog box if the mainwindow is on the first monitor, it appears the same as the first image.
        When i generate the dialog box, if the mainwindow is on the second monitor, it appears the same as the second image.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          What OS are you running ?
          If Linux:

          • What distribution are you using ?
          • What desktop environment are you using ?
          • What Window Manager are you using ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • R Offline
            R Offline
            rafael
            wrote on last edited by
            #5

            OS is windows 10 Enterprise.
            using QT 5.9.1 msvc2015_64.

            jsulmJ 1 Reply Last reply
            0
            • R rafael

              OS is windows 10 Enterprise.
              using QT 5.9.1 msvc2015_64.

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

              @rafael said in what window flag to set for qdialogbox?:

              QT 5.9.1

              I would try with recent Qt version to see whether this issue is already fixed.

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

              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