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. updating qt4 to qt5 LogText is replaced with?
Forum Updated to NodeBB v4.3 + New Features

updating qt4 to qt5 LogText is replaced with?

Scheduled Pinned Locked Moved Solved General and Desktop
linuxqt creator 4.11c++
3 Posts 2 Posters 456 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
    micha_eleric
    wrote on last edited by
    #1

    qt4 code:

    label_3->setTextFormat(Qt::LogText);
    

    found a post that said replace "LogText", with "TextFormat", however,

    label_3->setTextFormat(Qt::TextFormat);
    

    results in

    /home/michaeleric/GUI/CUi_MainWindow.h:1616: error: expected primary-expression before ‘)’ token
     1616 |         label_3->setTextFormat(Qt::TextFormat);
          |                                              ^
    

    does someone know what is going on?

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

      enum Qt::TextFormat

      Constant         Value   Description
      Qt::PlainText      0      The text string is interpreted as a plain text string.
      Qt::RichText       1      The text string is interpreted as a rich text string. See Supported HTML Subset for the definition of rich text.
      Qt::AutoText       2      The text string is interpreted as for Qt::RichText if Qt::mightBeRichText() returns true, otherwise as Qt::PlainText.
      
      M 1 Reply Last reply
      2
      • M mpergand

        enum Qt::TextFormat

        Constant         Value   Description
        Qt::PlainText      0      The text string is interpreted as a plain text string.
        Qt::RichText       1      The text string is interpreted as a rich text string. See Supported HTML Subset for the definition of rich text.
        Qt::AutoText       2      The text string is interpreted as for Qt::RichText if Qt::mightBeRichText() returns true, otherwise as Qt::PlainText.
        
        M Offline
        M Offline
        micha_eleric
        wrote on last edited by
        #3

        @mpergand thank you. "PlainText" fix it

        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