Titlebar and border doesn't appear for QInputDialog.
-
I've wrote a simple slot function to show an inputdialog. But it appears without titlebar and border 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?
I see even my mainwindow doesn't have border and titlebar...
-
Hi,
Android and iOS don't use the same paradigm as desktop OSs so it's perfectly normal to not have such decorations.
As a side note, you are using getText wrongly, it's as static function
-
Thanks SGaist for the info.
But it looks unpleasant when a dialog appears over the main widow. Is there any solution for making the view better?
And as per the side note I modified the code as below
@void PriceChecker::showSettings()
{
QInputDialog UrlDialog;
QString baseUrl;if (QDialog::Accepted == UrlDialog.exec()) { baseUrl = dlg.textValue(); }
}@
-
The better way is:
@ QString baseUrl = QInputDialog::getText(m_pMainWidget, "Settings", "Enter BaseURL");@
What do you mean by "making the view better" ?