Results 1 to 3 of 3

Thread: Qt5: Can't get bold text in QTextEdit with monospace font (Courier)

  1. #1

    Default Qt5: Can't get bold text in QTextEdit with monospace font (Courier)

    I can't get bold text in QTextEdit with monospace font (Courier). Anyone have any ideas? Worked in Qt4, porting to Qt5, but no luck with this one problem. Using Leap 15.0 and Qt 5.9.4
    Desktop : Leap 15.0 | KDE Plasma | AMD Phenom II x6 1035T | 8 GB Memory | Integrated Radeon HD4250 | Ext4
    Laptop: Leap 15.0 | KDE Plasma | Intel Core i5 3rd Gen 3320M 2.6GHz | Intel HD Graphics 4000 | 8 GB Memory | Ext4

  2. #2

    Default Re: Qt5: Can't get bold text in QTextEdit with monospace font (Courier)

    This is the code I'm using:

    Code:
        ui.textEdit->setFontFamily("Courier");
        ui.textEdit->setFontPointSize(16.0);
        
        ui.textEdit->setFontWeight(QFont::Bold); // NOT WORKING IN QT5 
        ui.textEdit->append("Aisle 1");
        ui.textEdit->append("=======");
    
        ui.textEdit->setFontWeight(QFont::Normal);
        ui.textEdit->append("Milk");
        ui.textEdit->append("Eggs");
    Desktop : Leap 15.0 | KDE Plasma | AMD Phenom II x6 1035T | 8 GB Memory | Integrated Radeon HD4250 | Ext4
    Laptop: Leap 15.0 | KDE Plasma | Intel Core i5 3rd Gen 3320M 2.6GHz | Intel HD Graphics 4000 | 8 GB Memory | Ext4

  3. #3

    Default Re: Qt5: Can't get bold text in QTextEdit with monospace font (Courier)

    It's working in IceWM .... but not Plasma. So it's not me. So, what is it? A bug in Plasma, or Qt5?
    Desktop : Leap 15.0 | KDE Plasma | AMD Phenom II x6 1035T | 8 GB Memory | Integrated Radeon HD4250 | Ext4
    Laptop: Leap 15.0 | KDE Plasma | Intel Core i5 3rd Gen 3320M 2.6GHz | Intel HD Graphics 4000 | 8 GB Memory | Ext4

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •