Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Italian
  4. Formattare il testo su QStatusBar...

Formattare il testo su QStatusBar...

Scheduled Pinned Locked Moved Solved Italian
3 Posts 2 Posters 1.1k 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.
  • S Offline
    S Offline
    Stefanoxjx
    wrote on last edited by
    #1

    Ciao a tutti, volevo chiedere se è possibile (e sono sicuro di si visto che le Qt mi stupiscono sempre di più per la loro versatilità) formattare il testo in una QStatusBar.
    Avrei necessità di scrivere una parte del testo sulla sinistra della statusbar e un'altra parte sulla destra.
    Ho provato con dei tag HTML e il metodo .setText(<p align=left>TESTO A SINISTRA</p><p align=right>TESTO A DESTRA</p>) ma funziona in parte, nel senso che "TESTO A DESTRA" viene una riga più sotto.
    Spero di essermi spiegato e di trovare qualcuno che mi possa aiutare.
    Grazie.

    Stefano

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      Traduzione di https://forum.qt.io/topic/73430/problem-to-align-text-in-qstatusbar

      Se non sbaglio QStatusBar non ha un metodo setText ma non importa. il problema non e' Qt ma solo HTML, <p> crea un paragrafo, quindi fa a capo. dovresti usare <span>

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Stefanoxjx
        wrote on last edited by
        #3

        Per chi fosse interessato la soluzione si trova qui: https://forum.qt.io/topic/73430/problem-to-align-text-in-qstatusbar/11

        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