Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. How to make the dialog and the text fit the device screen?
Forum Update on Monday, May 27th 2025

How to make the dialog and the text fit the device screen?

Scheduled Pinned Locked Moved Solved Qt 6
quick controls
3 Posts 3 Posters 413 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.
  • D Offline
    D Offline
    Dmitriano
    wrote on 14 Dec 2021, 04:49 last edited by
    #1

    I have a dialog with long text Required sound format is not supported on your device. The application will continue to work, but the sound will be disabled.:

    import QtQuick
    import QtQuick.Controls
    import QtQuick.Layouts
        
         Dialog {
            id: soundWarningDialog
            modal: true
            title: "Too long text"
            standardButtons: Dialog.Ok
    
            Text {
                text: qsTr("SoundWarning_Key")
            }
        }
    

    on Android emulator it looks like this:

    bd83a7b4-c362-440f-b938-1e79752db79c-image.png

    How to make the dialog and the text fit the emulator screen?

    K 1 Reply Last reply 14 Dec 2021, 12:55
    0
    • M Offline
      M Offline
      Markkyboy
      wrote on 14 Dec 2021, 09:43 last edited by
      #2
      This post is deleted!
      1 Reply Last reply
      0
      • D Dmitriano
        14 Dec 2021, 04:49

        I have a dialog with long text Required sound format is not supported on your device. The application will continue to work, but the sound will be disabled.:

        import QtQuick
        import QtQuick.Controls
        import QtQuick.Layouts
            
             Dialog {
                id: soundWarningDialog
                modal: true
                title: "Too long text"
                standardButtons: Dialog.Ok
        
                Text {
                    text: qsTr("SoundWarning_Key")
                }
            }
        

        on Android emulator it looks like this:

        bd83a7b4-c362-440f-b938-1e79752db79c-image.png

        How to make the dialog and the text fit the emulator screen?

        K Offline
        K Offline
        KroMignon
        wrote on 14 Dec 2021, 12:55 last edited by
        #3

        @Dmitriano You have to set Text properties according to your needs:

        Text {
            width: parent.width
            text: qsTr("SoundWarning_Key")
            wrapMode: Text.WordWrap
        }
        

        It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

        1 Reply Last reply
        2

        1/3

        14 Dec 2021, 04:49

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved