Results 1 to 5 of 5

Thread: QMessageBox error

  1. #1
    Join Date
    May 2007
    Posts
    315
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default QMessageBox error

    Hi. I've got a problem. I have a piece of code:
    Qt Code:
    1. int ret = QMessageBox::Information(this, tr("Speed Units Converter"),
    2. tr("You can't convert value to the same unit"),
    3. QMessageBox::Ok | QMessageBox::Default);
    4. if (ret == QMessageBox::Ok)
    5. {
    6. return false;
    7. }
    To copy to clipboard, switch view to plain text mode 

    And I reach error that Information cannot be used as a function
    Regards

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QMessageBox error

    QMessageBox::information() with lower case i.
    J-P Nurmi

  3. #3
    Join Date
    May 2007
    Posts
    315
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QMessageBox error

    Thanks, now's all right. But there's another problem. Here's piece of code
    Qt Code:
    1. if (beaufortBox->isChecked() && knotBox_2->isChecked())
    2. {
    3. convertDialog->setWindowTitle("Converting value from Beaufort to Knot");// this is error line
    4. toLabel->setText("Knot(s)");
    5. displayConvertDialog();
    6. }
    To copy to clipboard, switch view to plain text mode 

    And I've got error, that expected primary expression before -> token. What is this problem about? Regards

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QMessageBox error

    Where is "convertDialog" declared?
    J-P Nurmi

  5. #5
    Join Date
    May 2007
    Posts
    315
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QMessageBox error

    it is form created by designer, I was subclassing this form.

Similar Threads

  1. Installation on Fedora Core 4
    By jcr in forum Installation and Deployment
    Replies: 3
    Last Post: 29th January 2009, 01:34
  2. qt 4.2.2 install on aix
    By try to remember in forum Installation and Deployment
    Replies: 2
    Last Post: 28th March 2007, 12:19
  3. Qt-x11-commercial-src-4.2.0-snapshot-20060824 error
    By DevObject in forum Installation and Deployment
    Replies: 4
    Last Post: 24th August 2006, 23:31
  4. use qpsql
    By raphaelf in forum Installation and Deployment
    Replies: 34
    Last Post: 22nd August 2006, 12:52
  5. Am I the only one with "make" error ?
    By probine in forum Installation and Deployment
    Replies: 1
    Last Post: 13th February 2006, 12:54

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.