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?
Qt 6.11 is out! See what's new in the release blog

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 1.1k 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 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?

    KroMignonK 1 Reply Last reply
    0
    • MarkkyboyM Offline
      MarkkyboyM Offline
      Markkyboy
      wrote on last edited by
      #2
      This post is deleted!
      1 Reply Last reply
      0
      • D Dmitriano

        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?

        KroMignonK Offline
        KroMignonK Offline
        KroMignon
        wrote on 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

        • Login

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