[Interest] QPainter, elastic rectangles

Alexander Syvak alexander.svk at gmail.com
Mon Jul 29 05:11:25 CEST 2013


It's fixed. The question is closed.

There's another one.
Look at the next piece of code

void event_dlg::create_pattern()

{

    qDebug() << "create_pattern() slot's been called!";

    pattern_qualifier ptrn_qualifier_wdg(this);

    ptrn_qualifier_wdg.setWindowFlags(Qt::FramelessWindowHint|Qt::Popup);
// N.B. !!! Popup doesn't require a title bar and a parent.

    auto const full_screen_rect =
QApplication::desktop()->screenGeometry(); // N.B. !!! Returns the
geometry of the screen with index screen.


      // The default screen is used if screen is -1.

    ptrn_qualifier_wdg.setGeometry(full_screen_rect);

    ptrn_qualifier_wdg.showMaximized();

    int usr_anwer = ptrn_qualifier_wdg.exec();

}

The event_dlg is of type QDialog. The pattern_qualifier may be
anything from QWidget, QDialog, QMainWindow.

#1. When it inherits QWidget it's not visible or it's not even
started. I don't understand this.

#2. When it inherits QDialog without Qt::Popup flag set, the event_dlg
window is blocked except the title bar thereof.

#3. After the Qt::Popup flag is set it is shown and it works.

Why in #1 it's not shown at all?

Why in #2 it's blocking its parent but not visible

Why in #3 it's working fine with Qt::Popup?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130729/2ec2bc33/attachment.html>


More information about the Interest mailing list