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. QDialog loses OSX sheet style once QComboBox is activated
Forum Updated to NodeBB v4.3 + New Features

QDialog loses OSX sheet style once QComboBox is activated

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 2.1k 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.
  • N Offline
    N Offline
    notrodash
    wrote on last edited by
    #1

    In my application I have a QDialog which contains a QComboBox. Whenever this QComboBox is triggered, the QDialog title bar appears and it turns into a window which can be moved around. When I hit ESC the dialog performs the closing animation of an OSX Sheet. Is there something I can do to prevent this? Is this a bug? This did not happen in Qt 4.x.

    Code for screenshots below:
    @#include <QtWidgets/qapplication.h>
    #include <QtWidgets/qmainwindow.h>
    #include <QtWidgets/qdialog.h>
    #include <QtWidgets/qgridlayout.h>
    #include <QtWidgets/qcombobox.h>

    int main(int argc, char** argv){
    QApplication app(argc, argv);

    QMainWindow* mainWindow = new QMainWindow();
    mainWindow->setWindowTitle("This is the main window");
    
    QDialog* dialog = new QDialog(mainWindow);
    mainWindow->setFixedSize(QSize(300, 100));
    mainWindow->show();
    dialog->setWindowFlags(Qt::Sheet);
    dialog->setWindowTitle("This is the dialog");
    dialog->setFixedSize(QSize(200, 70));
    QGridLayout* layout = new QGridLayout(dialog);
    dialog->setLayout(layout);
    QComboBox* combo = new QComboBox(dialog);
    combo->addItem("Item 1");
    combo->addItem("Item 2");
    combo->addItem("Item 3");
    combo->addItem("Item 4");
    layout->addWidget(combo);
    dialog->open();
    
    return app.exec();
    

    }@

    Screenshots:

    Before clicking the QComboBox
    !http://i.stack.imgur.com/EYHPX.png(Before clicking the QComboBox)!
    After clicking the QComboBox
    !http://i.stack.imgur.com/WfnJ0.png(After clicking the QComboBox)!
    The QDialog can now be moved around
    !http://i.stack.imgur.com/pioer.png(The QDialog can now be moved around)!

    Thank you!

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

      Hi and welcome to devnet,

      This sounds like a bug, you should have a look at the "bug report system":http://bugreports.qt-project.org/issues/ to check whether it has already been reported. If not, you could open a new bug report.

      Bug reported on this forum are likely to not get noticed as only few Qt developers follows it (it's more user oriented)

      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
      • N Offline
        N Offline
        notrodash
        wrote on last edited by
        #3

        [quote author="SGaist" date="1377199446"]Hi and welcome to devnet,

        This sounds like a bug, you should have a look at the "bug report system":http://bugreports.qt-project.org/issues/ to check whether it has already been reported. If not, you could open a new bug report.

        Bug reported on this forum are likely to not get noticed as only few Qt developers follows it (it's more user oriented)[/quote]
        Ah ok, I'll do that right away.

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

          Thank you :)

          Don't forget to update this thread with a link to the bug report

          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
          • N Offline
            N Offline
            notrodash
            wrote on last edited by
            #5

            Here is the bug report - "https://bugreports.qt-project.org/browse/QTBUG-33126":https://bugreports.qt-project.org/browse/QTBUG-33126

            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