Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML FileDialog size

QML FileDialog size

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
4 Posts 2 Posters 268 Views
  • 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.
  • K Offline
    K Offline
    Kuzma30
    wrote on last edited by Kuzma30
    #1

    I use on arm linux (raspberryPi, weston 13.03) in QML (Qt 6.8.1) such code

    FileDialog {
           id: fileDialog
           title: qsTr("Select Firmware File")
           nameFilters: ["Firmware files (*.bin)", "All files (*)"]
           onAccepted: {
               if (fileDialog.selectedFile) {
                   fw.loadFirmWareFromFile(fileDialog.selectedFile)
                   loadFW.open()
               } else {
                   console.log("No file selected")
               }
           }
           onRejected: {
               console.log("File selection was canceled")
           }
       }
    

    FileDialog fit all screen. Its not usable.
    Can I specify width and height of FileDialog, font size?

    1 Reply Last reply
    0
    • B Offline
      B Offline
      Brannon K.
      wrote on last edited by
      #2

      You can play with the font size. The easiest way would be to use the QT_FONT_DPI environment variable. Try a bunch of different values until you get a good fit. Maybe start with a value of 96 and go down. (I don't know what your actual DPI is.)

      1 Reply Last reply
      0
      • K Offline
        K Offline
        Kuzma30
        wrote on last edited by
        #3

        IMG_20241030_104154_426.jpg
        Fonts size is not bigest problem

        1 Reply Last reply
        0
        • K Offline
          K Offline
          Kuzma30
          wrote on last edited by
          #4

          Some more info.
          I use kiosk-shell mode for weston (I need use one app in full screen mode). When I change it to desktop-shell, dialog size is normal, but I see maximize, minimize and close buttons for app.

          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