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. Target pattern error (Qt4.85 on Mojave 10.14.6)
Forum Updated to NodeBB v4.3 + New Features

Target pattern error (Qt4.85 on Mojave 10.14.6)

Scheduled Pinned Locked Moved Solved General and Desktop
24 Posts 2 Posters 3.2k 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.
  • M Offline
    M Offline
    marvic
    wrote on last edited by marvic
    #21

    @SGaist
    After changing the lib, include paths and with qt_phonon4qt5.pri coping to modules.

    able to compile, but it crashes,

    This is happing because of

     QKeySequence key = shortcut_it.key();
    
            // Connect every shortcut with the setFocus slot, to ensure proper focus.
            connect( shortcut, SIGNAL( activated() ), this , SLOT( setFocus() ), Qt::UniqueConnection );
    
            switch ( key )
    
    /src/main/mainwindow.cpp:223: error: statement requires expression of integer type ('QKeySequence' invalid)
            switch ( key )
            ^        ~~~
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #22

      That's invalid C++ code. You cannot switch on a type like that.

      What do the cases contain ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      M 1 Reply Last reply
      0
      • SGaistS SGaist

        That's invalid C++ code. You cannot switch on a type like that.

        What do the cases contain ?

        M Offline
        M Offline
        marvic
        wrote on last edited by marvic
        #23

        @SGaist
        This works fine on older version, On Win7 worked without error

                QShortcut* shortcut = shortcut_it.value().get();
                QKeySequence key = shortcut_it.key();
        
                switch ( key )
                {
                    case Qt::Key_F:
                        connect( shortcut, SIGNAL( activated() ), this , SLOT( on_actionFull_Screen_triggered() ) );
                        break;
        
                    case Qt::Key_Escape:
                        connect( shortcut, SIGNAL( activated() ), this , SLOT( on_actionExit_triggered() ) );
                        break;
        
                    default
                            :
                        break;
                }
        
        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #24

          That was just luck. The current error you get is correct.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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