[Interest] [ Android ] QMessageBox does not display added buttons ?

Rutledge Shawn Shawn.Rutledge at theqtcompany.com
Fri Jul 17 16:59:52 CEST 2015


Yeah there are various issues:

https://bugreports.qt.io/issues/?jql=text%20~%20%22android%20qmessagebox%22

QTBUG-35545 is probably the one you’re interested in.

On 16 Jul 2015, at 17:52, Edward Sutton <edward.sutton at subsite.com> wrote:

> Hi Robert,
> 
> Thanks, I will create one on my Qt account portal.
> 
> ( Using Qt 5.5 )
> 
> -Ed
> 
> 
>> On Jul 16, 2015, at 10:44 AM, Robert Iakobashvili <coroberti at gmail.com> wrote:
>> 
>> Hi Ed,
>> To report this issue as a bug?
>> Regards,
>> Robert
>> 
>> 
>> On Thu, Jul 16, 2015 at 6:40 PM, Edward Sutton
>> <edward.sutton at subsite.com> wrote:
>>> This works fine on OS X but not Android?
>>> 
>>> On Android no buttons are shown?
>>> 
>>>    // Example:
>>> 
>>>    // ---------------------------------------------
>>> 
>>>    // Software Update
>>> 
>>>    // Version 12 is ready to install.  Your TKQ
>>> 
>>>    // will restart when installation is finished
>>> 
>>>    // [ Later ]    [ Install ]
>>> 
>>>    // ---------------------------------------------
>>> 
>>>    QString prompt = tr("Version %1 is ready to install.  Your %2"
>>> 
>>>                        "will restart when installation is finished")
>>> 
>>>                     .arg(m_versionLatestTracker)
>>> 
>>> 
>>> .arg(m_trackerConnection->trackerConfiguration()->trackerModelName());
>>> 
>>> 
>>>    QMessageBox softwareUpdateDialog(this);
>>> 
>>>    softwareUpdateDialog.setWindowTitle(tr("Software Update"));
>>> 
>>>    softwareUpdateDialog.setText(prompt);
>>> 
>>>    softwareUpdateDialog.addButton(tr("Later"), QMessageBox::RejectRole);
>>> 
>>>    QPushButton* acceptButton =
>>> softwareUpdateDialog.addButton(tr("Install"),QMessageBox::AcceptRole);
>>> 
>>>    softwareUpdateDialog.exec();
>>> 
>>>    if(acceptButton != softwareUpdateDialog.clickedButton())
>>> 
>>>    {
>>> 
>>>        return;
>>> 
>>>    }
>>> 
>>> 
>>> Suggestions are appreciated.
>>> 
>>> 
>>> -Ed



More information about the Interest mailing list