What is the difference between Row and RowLayout?

Row is a Item Positioner. Positioner items are container items that manage the positions of items in a declarative user interface. RowLayout is part of Qt Quick Layouts. They manage both the positions and the sizes of items on a declarative user interface, and are well suited for resizable user interfaces. Your code with RowLayout … Read more

Qt QHBoxLayout percentage size

void QSizePolicy::setHorizontalStretch(uchar stretchFactor) Example: QHBoxLayout* layout = new QHBoxLayout(form); QWidget* left = new QWidget(form); QSizePolicy spLeft(QSizePolicy::Preferred, QSizePolicy::Preferred); spLeft.setHorizontalStretch(1); left->setSizePolicy(spLeft); layout->addWidget(left); QWidget* right = new QWidget(form); QSizePolicy spRight(QSizePolicy::Preferred, QSizePolicy::Preferred); spRight.setHorizontalStretch(2); right->setSizePolicy(spRight); layout->addWidget(right);

CMAKE_PREFIX_PATH doesn’t help CMake in finding Qt5

I installed the following missing packages: sudo apt-get install qtbase5-dev sudo apt-get install qtdeclarative5-dev Attaching any kind of prefix is not required now: CMakeList: :~/junk/qtquick_hello_cmake$ cat CMakeLists.txt cmake_minimum_required(VERSION 2.8.12) project(qtquick_hello_cmake) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) find_package(Qt5 COMPONENTS Quick Core REQUIRED) qt5_add_resources(RESOURCES qml.qrc) add_executable(${PROJECT_NAME} “main.cpp” “qml.qrc”) qt5_use_modules(${PROJECT_NAME} Quick Core) target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Quick) New output: :~/junk/qtquick_hello_cmake$ … Read more

How to change row height in QTextTable

it seems that you can use the setHTML(QString) or insertHTML(QString) functions to insert a stylesheet. When using this function with a style sheet, the style sheet will only apply to the current block in the document. In order to apply a style sheet throughout a document, use QTextDocument::setDefaultStyleSheet() instead. ref: http://harmattan-dev.nokia.com/docs/platform-api-reference/xml/daily-docs/libqt4/qtextedit.html#insertHtml appart from using shims….according … Read more

Can we use QT with C# to create GUI?

.Net C# and QT are totally different frameworks but there is .Net binding for QT My advice is do not combine frameworks they can introduce so many issues, as you said that you are a beginner you can learn Telerik UI for nice user interface EDIT: If you are going to combine them regardless of … Read more

Create a PDF document for printing in Qt from a template

There are several ways to create a PDF document in Qt. You already mentioned two of them. I propose some improvement for the QTextDocument approach. Rather than manually writing a QTextDocument, you can create it from HTML-formatted text. QString html = “<div align=right>” “City, 11/11/2015” “</div>” “<div align=left>” “Sender Name<br>” “street 34/56A<br>” “121-43 city” “</div>” … Read more