Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QMessageBox inside a QGraphicsScene
Forum Updated to NodeBB v4.3 + New Features

QMessageBox inside a QGraphicsScene

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 792 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    stukdev
    wrote on last edited by
    #1

    Hi, i have more QGraphicsPixmapItem inside a QGraphicsScene. I Create a signal on these object so i can know when a QGraphicsPixmapItem is clicked. If i try something like that:
    @
    void Home::pixmapPressed(quint16 id)
    {
    qDebug() << "id: " << id;

    switch(id)
    {
        case 0: 
            break;
        case 1: 
        case 2:
            break;
    }
    

    }
    @
    The result is the id of the pixmap and all works well.
    But if i change is something like that:
    @
    void Home::pixmapPressed(quint16 id)
    {
    qDebug() << "id: " << id;

    switch(id)
    {
        case 0: 
            formManager(FORM_NEXT);
            break;
        case 1: 
        case 2:
            QMessageBox::information(this,"test","test");
            break;
    }
    

    }@

    If i click the pixmap 0, call the formManager and this is ok. But if i click 1 or 2 i get the QMessageBox and after i close that all area of a QGraphicScene call a pixmapPressed with the latest id that open the QMessageBox!!! This is very strange!

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved