Reputation: 735
I've wrote a simple slot function to show an inputdialog. But it appears as below in android emulator. The code is :
void PriceChecker::showSettings()
{
QInputDialog UrlDialog;
QString baseUrl = UrlDialog.getText(m_pMainWidget, "Settings", "Enter BaseURL");
}
Can someone tell why this happens?
Upvotes: 1
Views: 608
Reputation: 781
... either it's a problem of the customized style of my host application (since i'm doing a plugin), or it's the same on windows;
anyway it can be easily worked around by explicitly setting the window flags like:
QInputDialog d;
Qt::WindowFlags f = d.windowFlags();
f |= Qt::Dialog;
d.setWindowFlags(f);
Upvotes: 0
Reputation: 21514
It does this for all QDialog-based widget being displayed. They never have border nor title bar...except QMessageBox.
QMessageBox
-> this shows with title and borderQInputDialog
-> this shows with no title and borderQDialog
-> this shows with no title and borderI workarounded the problem by catching QEvent::ShowToParent
event in QApplication::notify
and making dialog about to be displayed size fit main frame size, it then covers the whole screen. At least controls are not mixed with the main frame controls....
Note: I submitted this Qtbug: https://bugreports.qt-project.org/browse/QTBUG-39623
Upvotes: 0