×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Jul 2007
    Location
    Eindhoven, the Netherlands
    Posts
    187

    Problem with dialog running on Qt Simulator

    Hi,

    I've been trying every now and then to get my code (which runs fine in the emulator and on the device) running in the simulator on linux. I have reached a point where it runs fine in normal mode, however whenever i want to execute a dialog, it exits with a SEGV.
    I've tried debugging, and it seems to crash as soon as i step into the exec() function of the dialog. The crash must be somewhere in the Qt stack, since the last c++ code showing up in the backtrace is the call to exec().

    Can anyone give me some tips how to investigate this further? Or better yet, explain to me why the 'cancel' button in the code underneath is wreaking havoc? Leaving the button out seems to bring up the dialog fine, but obviously i then have no way out...

    Regards,
    Mark.

    Code:
    class OptionsTab: public QWidget
    {
    public:
        OptionsTab(QWidget* parent=0): QWidget(parent)
        {
        }
    };
    
    class OptionsDialog: public QDialog
    {
    public:
        OptionsDialog(QWidget* parent=0): QDialog(parent)
        {
            QTabWidget* tabWidget = new QTabWidget;
            tabWidget->addTab(new OptionsTab(), tr("Options"));
    
            QPushButton* cancel = new QPushButton(tr("Cancel"));
    
            QVBoxLayout *mainLayout = new QVBoxLayout;
            mainLayout->addWidget(tabWidget);
            mainLayout->addWidget(cancel);
            setLayout(mainLayout);
            showFullScreen();
        }
    };
    
    void MainWindow::ShowOptions()
    {
        OptionsDialog dialog;
        dialog.exec();
    }

  2. #2
    Registered User
    Join Date
    Jul 2009
    Posts
    1

    Re: Problem with dialog running on Qt Simulator

    Yes, now it happens also to me :'(((((

    Before latest update of SDK, everything was fine ...

Similar Threads

  1. Replies: 3
    Last Post: 2010-06-30, 01:17
  2. Nokia Qt SDK, QT Simulator and virtual keyboards
    By donald@anasim.com in forum [Archived] Qt SDKs and Tools
    Replies: 0
    Last Post: 2010-05-29, 09:33
  3. [Nokia Qt SDK] Qt Simulator does not update UI
    By pixsta in forum [Archived] Qt SDKs and Tools
    Replies: 10
    Last Post: 2010-05-19, 21:54

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×