Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Italian
  4. Come gestire le dimensioni variabili degli schermi:
Forum Updated to NodeBB v4.3 + New Features

Come gestire le dimensioni variabili degli schermi:

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

    Vorrei che mi indirizzaste su cosa guardare, con Qt devo gestire manualmente le dimensioni delle finestre i font i widget lineedit, le immagini etc per adattarle alle dimensioni dello schermo, o c'è qualche tool o qualche meccanismo automatico per cui dichiarando il form in un certo modo diventa adattabile allo schermo?
    Ciao e grazie

    1 Reply Last reply
    0
    • E Offline
      E Offline
      etognoni
      wrote on last edited by
      #2

      Ho trovato un post in inglese che penso risponda alla domanda:
      http://qt-project.org/forums/viewthread/6381
      In sostanza dice che la grandezza dei widget va gestita nei sorgenti dallo sviluppatore utilizzando: QDesktopWidget

      ciao e grazie

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

        Prima salva le dimensioni dello schermo:

        @ qint16 width = QApplication::desktop()->width();
        qint16 height = QApplication::desktop()->height();@

        Poi fai la proporzione in base alla risoluzione del tuo schermo:

        @ui->percorsoLabel->move((35*width/1280),(40*height/800));
           ui->percorsoLabel->resize((65*width/1280),(20*height/800));
           ui->lineEditDirectory->move((100*width/1280),(40*height/800));
           ui->lineEditDirectory->resize((600*width/1280),(20*height/800));@
        

        nel mio caso la dimesione del mio schermo è 1280X800.
        35 (percorsolabel) è la lunghezza sul mio schermo.

        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