How do I convert my font on a QGraphicsObject from point size to pixel size? I need to do this so the fonts will look right when I print my QGraphicsScene using QGraphicsScene::render().
how to calculate qfont pixel size from point size
14.6k Views Asked by David Burson At
1
There are 1 best solutions below
Related Questions in QT
- C++ template using pointer and non pointer arguments in a QVector
- Using QPointer and QObject::connect with C++11
- qt How to style a QToolBar > QToolButton overflow button?
- Qt - Repeatedly write at beginning of file
- C++ Mongodb driver, not working
- deletion and cleanup of worker thread in Qt crashes
- How to drap item from QTableView to QPushButton?
- get image type from qimage
- C++ QT Getting part from QString
- How to connect a destroyed signal of C++ object from QML?
- How to get shader version from QOpenGLShader?
- Size of Qt QRadioButton able to get smaller, but not larger than default
- error WinSock.h has already been included Boost Windows Qt
- How to call a non-class member function with pointers as parameters with QtConcurrent::run?
- What is the difference between MinGW SEH and MinGW SJLJ?
Related Questions in QT4
- Why scrollContentsBy(dx, dy) function not called when scroll by moving the cursor in QPlainTextEdit
- How to grab video frames in Qt?
- PySide: How to append text from different classes in QTextBrowser?
- Using Qmake in Makefile?
- Making QMessageBox InformativeText Bold and increase font size
- Show name of song on Qlabel
- qt designer qgraphicsview load image
- Qt4: Window appears in the upper left corner on metacity
- Qt application changes font when run as root
- How to include a lib with dependencies to QT
- Missing mocinclude.tmp
- Qt4 C++ Resize window, preserve square form
- Disconnect slot from parent class QAbstractItemView
- space between two tool buttons and hboxlayout
- Qt4 QTreeWidget with VS2015 x64 win10
Related Questions in FONT-SIZE
- Webpage - Font size of table items on mobile phone browsers changes
- Font Scaling on iPhone 6 plus looks like rasterized scaling in Revolution Slider
- Resizing font based on html length
- Internet Explorer iconfont problems
- Windows phone Store app Font size Issue
- Android EditText setHint's font size dynamically
- Change font size of likert plot legend and value label arrangement
- How to style Font Awesome in HTML document
- how to set different font sizes in the same html header?
- What is the fontawesome default font em size?
- jQuery: Change font size with slider as soon as it is activated - how?
- Let the user change font size
- Changing font-size of h1/h2/h3 with button on my website (Using local storage)
- Default font size of WPF Run object?
- How to change font size of validation result in WPF C#
Related Questions in QT4.6
- How to use QGraphicsVeiw
- Using QGraphicsWebView to render HTML and access the raw bits
- QCompleter Custom Completion Rules
- Qt4 expanding tabs in QTabBar
- How to solve error LNK2001: unresolved external symbol?
- Identifying messages in a Qt Linguist translation file (TS file)
- "Refreshing" column header names in QT model
- Create Simple qml application
- Flush mouse events to a disabled widget
- Set a cross in QImage at the position, where mousepressed
- how to drag and drop from another widget on to a QGraphicsScene
- how to center a Qt mainform on the screen?
- Where to control the QWizard button?
- how to use Qt setWindowFilePath
- how to print a QGraphicsScene that has text and graphics
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Probably class QFontMetrics will do the job. Just create your desired QFont, set It's point size. Then create QFontMetrics object on your QFont.