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. Porting from QT4.6 to QT5
Forum Updated to NodeBB v4.3 + New Features

Porting from QT4.6 to QT5

Scheduled Pinned Locked Moved Unsolved General and Desktop
44 Posts 8 Posters 20.0k Views 5 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.
  • Q Qt Enthusiast

    @Qt-Enthusiast said in Porting from QT4.6 to QT5:

    I am using solution

    I am using
    QHeaderview* heade r = new QHeaderView
    #if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
    header->setStyle( new QFusionStyle );
    #else
    header->setStyle( new QCleanlooksStyle );
    #endif
    I am getting error: 'QFusionStyle' does not name a type

    Can some use help in proper usage of fusion style

    aha_1980A Offline
    aha_1980A Offline
    aha_1980
    Lifetime Qt Champion
    wrote on last edited by
    #41

    @Qt-Enthusiast

    See here: http://doc.qt.io/qt-5/sourcebreaks.html#changes-to-qstyle

    "
    QFusionStyle is internal. Recommended alternatives:

    • QStyleFactory for creating instances of specific styles.
    • QProxyStyle for customizing existing style implementations.
    • QCommonStyle as a base for implementing full custom styles.

    "

    Qt has to stay free or it will die.

    1 Reply Last reply
    1
    • M Offline
      M Offline
      mpergand
      wrote on last edited by mpergand
      #42

      @Qt-Enthusiast said in Porting from QT4.6 to QT5:

      header->setStyle( new QFusionStyle );

      header->setStyle( "Fusion" );  // maybe for QApplication only
      // or
      header->setStyle( new QStyleFactory::create("Fusion" ));
      
      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        Qt Enthusiast
        wrote on last edited by
        #43

        @mpergand said in Porting from QT4.6 to QT5:

        new QStyleFactory::create("Fusion" )
        its is not working

        can some one point me to a example how Qfusion style is being used in the Qt 5 code

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mpergand
          wrote on last edited by mpergand
          #44
          setStyle(QStyleFactory::create("Fusion")); // without new
          

          For me (OSX), it works only with QApplication, not with QWidget

          1 Reply Last reply
          1

          • Login

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