Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. Tags
    3. text
    Log in to post

    • UNSOLVED QML - letters randomly disappear when resizing label
      General and Desktop • qml bug text rendering label • • pohlondrej.1  

      3
      0
      Votes
      3
      Posts
      128
      Views

      I found out that I can reproduce this behavior by setting QT_DISTANCEFIELD_DEFAULT_BASEFONTSIZE, QT_DISTANCEFIELD_DEFAULT_SCALE and QT_DISTANCEFIELD_DEFAULT_RADIUS variables. With these, the problem occurs even on Windows. Not sure whether it's the same problem or not, but if QT_DISTANCEFIELD_DEFAULT_RADIUS is NOT DIVISIBLE by QT_DISTANCEFIELD_DEFAULT_SCALE, the problem occurs 100% of time (some letters will disappear). Example: export QT_DISTANCEFIELD_DEFAULT_BASEFONTSIZE=128 export QT_DISTANCEFIELD_DEFAULT_SCALE=12 export QT_DISTANCEFIELD_DEFAULT_RADIUS=96 // If I set this to 95 or 97 or anything not divisible by 12, it will break. Can someone explain me what these distancefield environment variables do and whether this is an intended behavior?
    • SOLVED How to change color of last character in QML Text?
      QML and Qt Quick • qml text text color • • Babs  

      5
      0
      Votes
      5
      Posts
      54
      Views

      @J-Hilk thank you
    • UNSOLVED Emit signal by clicking on the part of the text
      QML and Qt Quick • text click qml signalsslot qml link • • d.sukhomlinov  

      2
      0
      Votes
      2
      Posts
      36
      Views

      No need to calculate the position, use linkActivated signal handler https://doc.qt.io/qt-5/qml-qtquick-text.html#linkActivated-signal
    • UNSOLVED HTML - SVG images inserted in a text document show ugly
      QML and Qt Quick • image text html svg stretch • • jeanmilost  

      5
      0
      Votes
      5
      Posts
      136
      Views

      Is it possible to to extend QLabel and implement my own paintEvent() that draws the text and draws the svg image? It seems to work, but would problaby take alot of effort to get it right (i.e. to get the image in the right location everytime). void MypLabel::paintEvent(QPaintEvent* event) { QPainter painter(this); const auto pos = QPoint(0, 16); painter.drawText(pos, this->text()); const auto posPixMap = QPoint(30, 0); auto size = QSize(16, 16); auto pixMap = QIcon(":/Resources/smiley.svg").pixmap(size); painter.drawPixmap(posPixMap, pixMap); }
    • SOLVED QPainter ignore the text when the clipping is applied while printing to a PDF document
      General and Desktop • qpainter text pdf print clipping • • jeanmilost  

      3
      0
      Votes
      3
      Posts
      81
      Views

      @mrjj Thank you for your answer. So I tested to remove the text rectangle passed to the drawContents() function, and indeed the global clipping was applied instead.
    • SOLVED What is the correct way to use Text component to support multiple DPIs?
      QML and Qt Quick • text font size dpi mobile app deve responsive • • diredko  

      4
      0
      Votes
      4
      Posts
      310
      Views

      @diredko you can take a look at the Scalability section of the documentation The calculating scaling ratio section has an example that used to help me a lot when I first was confronted with this issue.
    • SOLVED I have a problem text rendering with Qt 5.7(QML)
      General and Desktop • qml qt 5.7 qlabel text • • MintogoDeveloper  

      4
      0
      Votes
      4
      Posts
      719
      Views

      I resolve it. I setted font of text as property of QML Text component. (Like font.family : parent.fontfamily) and on Qt 5.7's QML, there are no enough options to control font properties. so, I moved to C++ side and set a whole application font. QFont font = someClass.getLangFont(); //set property of font instance here // such as hinting policy, style etc. QApplication::setFont(font); now it looks very cleary... thank you..
    • SOLVED Qt3D: how to print text? (QText2DEntity)
      Game Development • c++ qt3d text qt3d 2.0 qtext2dentity • • zespy  

      7
      0
      Votes
      7
      Posts
      3441
      Views

      I've got the same issue with Qt3DExtras::QText2DEntity. But I found the workaround. Look like there is a bug? in implementation of Qt3DExtras::QText2DEntity that prevents internal initialization (QText2DEntityPrivate::setScene is never called). This happens when scene is already visible and Qt3DExtras::QText2DEntity is created with parent entity passed to constructor. The workaround I used to make it work is to pass nullptr (which is default) as parent in constructor and call ->setParent(parentEntity) in separate call. m_text2dLabel = new Qt3DExtras::QText2DEntity(); m_text2dLabel->setParent(parentNode);
    • UNSOLVED Qt Gui Text to ASCII art
      General and Desktop • text help project ascii • • Losnariu12  

      3
      0
      Votes
      3
      Posts
      885
      Views

      @aha_1980 Thanks for the answer . I will try your sugestions and see how it goes. I've done all this text to ASCII in console codeblocks C++ but it seems that i need a gui to it. I am not as good in Class'es and things like that. I will try it anyways. An example could be more than good for one letter . i could do the rest alone :P . Have a good night
    • UNSOLVED Text's fontFamily property invalid in QML
      QML and Qt Quick • qml text font family • • wangzhe  

      2
      0
      Votes
      2
      Posts
      637
      Views

      Looks strange. There is one example called fontDatabase in Qt examples. Can you compile in msvc and check this font is available ?
    • UNSOLVED Incorrect Font Metrics
      General and Desktop • text font qt5.9 qt quick 2.4 metrics • • romsharkov  

      8
      0
      Votes
      8
      Posts
      2732
      Views

      @romsharkov said in Incorrect Font Metrics: @raven-worx Didn't know about those methods, just tested it, for the lower case letter "g": QFontMetricsF::leftBearing() returns: -4.17188 QFontMetricsF::rightBearing() returns: 0.6875 But even if I add the (negated) leftBearing to the total text width it still doesn't cover the tail entirely, so what's wrong here? are you sure?! Those values seem to be correct / make sense according to your posted screens. Make sure that you add the absolute value (qAbs() for example). Also keep in mind that those values are only correct for the given font-size and that you can't add negative values to a image width. I guess you are just doing incorrect calculations. Can you show the code of the calculation?
    • UNSOLVED 2D text following a 3D object.
      General and Desktop • text 3drender • • madsm  

      1
      0
      Votes
      1
      Posts
      265
      Views

      No one has replied

    • UNSOLVED How to render text in QQuickFramebufferObject?
      QML and Qt Quick • opengl text text rendering qquickframebuff • • Stefan Monov76  

      1
      0
      Votes
      1
      Posts
      745
      Views

      No one has replied

    • UNSOLVED QT Console application - go back up one line and add text to current line
      General and Desktop • text console string formatting console applica • • CybeX  

      2
      0
      Votes
      2
      Posts
      828
      Views

      Hi, As silly as it may sound but wouldn't removing << std::endl from the checking line be enough ?
    • SOLVED how to add item QComboBox with QVideoFrame::PixelFormat?
      General and Desktop • qcombobox text strange additem pixelformat • • pauledd  

      7
      0
      Votes
      7
      Posts
      1979
      Views

      Ok, thanks a lot! Marked as solved!
    • UNSOLVED QComboBox align text stylesheet?
      General and Desktop • stylesheet qcombobox text align alignment • • pauledd  

      8
      0
      Votes
      8
      Posts
      7067
      Views

      QComboBox {background-color:rgb(190,190,190);color:black;padding-left: 10px;padding-right: 30px;border-style: solid;border-width: 0px;} "padding-left: 10px;" the padding will shift the combo-box displayed content form the left edge QComboBox::drop-down {subcontrol-origin: padding; subcontrol-position: top right;width: 40px;border: 0px ;} "subcontrol-position: top right;" and the above will position wot text to the right. Hopefully this helps.
    • SOLVED How can i convert Utf-8 encoding to normal text
      General and Desktop • qstring text utf-8 • • Rohith  

      15
      1
      Votes
      15
      Posts
      12280
      Views

      @Rohith instead of converting the unicode string to the escaped characters send it directly in binary form. When you have a QString already you can call QString::toUtf8() and send the returned QByteArray directly. On the client its enough to do QString::fromUtf8( receivedUtf8ByteArray.constData() ) It depends how you implemented the transfer. But theoretically it should be enough to replace your unicode escaping code on the server with this approach.
    • UNSOLVED QML - How display a text file on ListView?
      General and Desktop • qml qt quick text qstringlist • • justlooking  

      3
      0
      Votes
      3
      Posts
      2544
      Views

      I can't say that I understood your code, but if you'll change the return value of your reading method (read(), I presume) to QStringList, then you can display it with ListView in QML like this: ListView { //Layout.preferredHeight: childrenRect.height model: myFile.read() delegate: Text { text: modelData } }
    • UNSOLVED Annoying font/FontLoader warning in QtQuick2.0 (Qt5.7)
      QML and Qt Quick • qml text qt5.7 font • • alizadeh91  

      2
      0
      Votes
      2
      Posts
      1002
      Views

      Please report a bug at bugreports.qt.io.
    • UNSOLVED how to recieve/send text from one qml file to another qml file
      QML and Qt Quick • qml qt 5.7 text data textinput • • Qjay  

      4
      0
      Votes
      4
      Posts
      2243
      Views

      @Qjay You can get text like this, Create instance of search.qml means like Search(this is your search.qml file instance, first latter should be capital of your qml file) { id: searchText } 2 In search.qml file create property like property alias Name_of_variable(like textOfSearchField): id_of_textfield(search_text.text) Now wherever you want to use, can do like this. searchText(id_of_instance).Name_of_variable You will find exact value as you passed in search.qml file
    • SOLVED Export sqlserver Data To Text and Excel
      General and Desktop • text excel sqlserver • • M4RZB4Ni  

      6
      0
      Votes
      6
      Posts
      3207
      Views

      You can use QSqlQuery to run the select statements and loop the resultset with next() like in VRonin´s example. If you comma seperate the columns like in VRonin´s example you can open this file in excel. One more option, if your on windows is to use ODBC Excel Driver to generate the Excel file. With this you can use QSqlQuery to create tables and insert rows.
    • UNSOLVED bringing up a InputWindow on OSX for text input while typing text with asian laguage
      Brainstorm • qtextedit text inputmethod qinputmethodeve inputmethodhint • • AnkurSharma  

      1
      0
      Votes
      1
      Posts
      512
      Views

      No one has replied

    • UNSOLVED QPushButton font size error
      Mobile and Embedded • stylesheet qpushbutton text font size • • Wishmaster84  

      2
      0
      Votes
      2
      Posts
      888
      Views

      The application runs in RAM, with all the qt dll useful for the deployment. Is it possible that a RAM corruption can cause a problem related to interface (font corruption, background image corruption...)? Thank you
    • SOLVED Widgets inside a text-editor
      General and Desktop • widget text textedit embed • • Ramin  

      2
      0
      Votes
      2
      Posts
      1034
      Views

      Hi Have a look at http://doc.qt.io/qt-5.5/qtextobjectinterface.html#details http://doc.qt.io/qt-5/qtextobjectinterface.html and the "Text Object Example" It seems possible to create your own widget to support such feature but I have no tested it and do not know if object would receive events. also docs says "Copy and Paste operations ignore custom text objects."
    • UNSOLVED QPainter drawText vs QML Text
      General and Desktop • qml qpainter text cpp • • Zondar  

      6
      0
      Votes
      6
      Posts
      1923
      Views

      Aliasing problem ?
    • How to add multiple lines of text from a single class to a scene [SOLVEÐ]
      General and Desktop • text scene print • • nanoandrew4  

      7
      0
      Votes
      7
      Posts
      1725
      Views

      Ok, so what happened before is that the item you added was destroyed before it could be shown
    • Design popup using qml
      QML and Qt Quick • qml text popupwidget • • Anas A. Ismail  

      7
      0
      Votes
      7
      Posts
      1965
      Views

      You need to add the module path to QML import path. You can do that in 2 different ways: Add "<path-to-qml-material>/modules" to your QML2_IMPORT_PATH env var. Or add it in your main.cpp using engine.addImportPath("<path-to-qml-material>/modules/");
    • QML Text not rendered using custom build VS2015 Qt 5.6
      Installation and Deployment • qml qt5.6 text vs2015 • • mattytraxx  

      3
      0
      Votes
      3
      Posts
      1532
      Views

      So as it turns out, compiling Qt 5.5 from git seems to solve this problem. I tried my demo program, as well as Maroon, and both display text by default (without having to set renderType to Text.NativeRendering). Dang it. That's what I get for trying a pre-release version. Thanks for the suggestion.
    • Creating and showing new QML objects from C++
      QML and Qt Quick • qml c++ qobject text • • JackCWallace  

      2
      0
      Votes
      2
      Posts
      1056
      Views

      @JackCWallace You need to set an visual parent to the newly created item using setParentItem. For this you will have to create a QQuickItem ofcourse.
    • QML Text component shows differently when renderType(QtRender/NativeRendering) differs in win7.
      QML and Qt Quick • text qt5.4.2 freetype rendertype • • dhuta  

      1
      0
      Votes
      1
      Posts
      520
      Views

      No one has replied

    • Why Text component shows differently when renderType(QtRendering/NativeRendering) differs in Win7-opengl environment by using freetype engine?
      General and Desktop • qml text qt5.4.2 freetype fontengine rendertype • • dhuta  

      1
      0
      Votes
      1
      Posts
      625
      Views

      No one has replied

    • ListView: text disappears when scrolling (delegate is text over image)
      QML and Qt Quick • listview image text text rendering • • alexein1983  

      5
      0
      Votes
      5
      Posts
      2430
      Views

      My problem is image delegate only. I found addiotional regularity: problematic delegates have the same picture as last top delegate hidden during scroll down within ListView. It seems scrolling out delegate from visible area forces it's image repaint in other delegates, which are in visible area. This repaint seems to hide the text element, declered with z-order above the image. Reset the visible property (visible=false, visible=true) at end of each scrolling (using onMovementEneded) solves the problem. But, i don't want to pay the repaint price of such solution as my application is running on embedded device.
    • [SOLVED] Latin text became corrupted while text in other writing system present
      Mobile and Embedded • text font text rendering font family font match text corruption • • alexein1983  

      2
      0
      Votes
      2
      Posts
      776
      Views

      I found a workaround: Define environment variable within Qt application startup context: QML_USE_GLYPHCACHE_WORKAROUND = 1 Look on this topic: https://forum.qt.io/topic/39803/font-rendering-bug-on-some-android-devices/7
    • SOLVED Double line-height
      General and Desktop • text formatting • • soapbox  

      2
      0
      Votes
      2
      Posts
      733
      Views

      Fixed by using a different font.
    • QML Text items rendered as blocks - some iOS devices
      Mobile and Embedded • error text font • • bradsco  

      1
      0
      Votes
      1
      Posts
      454
      Views

      No one has replied

    • qml android texts are unclear
      Mobile and Embedded • text font textinput • • mehrdad  

      4
      0
      Votes
      4
      Posts
      1389
      Views

      thank you very much....
    • Qt Creator unreadable fonts
      The Lounge • qtcreator text font menu problem • • byT3b0N3  

      3
      0
      Votes
      3
      Posts
      1385
      Views

      ty, I have downgraded some packages (libglapi-mesa f.e.) and reinstalled some others. nopw everything is fine!
    • drawText in QQuickItem
      QML and Qt Quick • text qquickitem • • themts  

      11
      0
      Votes
      11
      Posts
      3408
      Views

      Thanks @p3c0 Based on the documentation, QtDeclarative has already been deprecated in favor of the two new classes: Qt Quick and Qt QML. QQuickPaintedItem can be use as convenient way to port QDeclarativeItem-based classes that use the QPainter API. I've been searching on the internet how to render text on QSG nodes but to no avail. I'm still stuck into this problem. :(