Qt Network and JSON example: a simple Hacker News reader

This tutorial will show you how to use Qt Network and JSON to create a simple Hacker News

4 Comments

  1. Ivan Moncalier

    I would like to be able to set different colors for each row. 🙂

    Regards

    Reply
    1. Davide Coppola (Post author)

      Add this code at the top of the StoryEntry constructor:

      QPalette pal;
      pal.setColor(QPalette::Background, Qt::white);
      setAutoFillBackground(true);
      setPalette(pal);

      Then you can play with it and pass a color to the constructor for example.

      Reply
  2. Twin

    Thanks for this quick insight on how to use QNetworkManager.

    Reply
  3. Augusto

    Hello, I came across this problem, qt.network.ssl: QSslSocket::connectToHostEncrypted: TLS initialization failed
    ,could someone help me, please?

    Reply

Leave a Comment

Your email address will not be published. Required fields are marked *