Если необходимо в ts файле перевода добавить перенос строки, то \n обычно не срабатывает.
Тогда необходимо при редактировании ts файла нажать Enter.
Additional info here.
Igorkam
Ярлыки
- С++ (3)
- Стихи (1)
- тонировка (1)
- Цитаты (2)
- ALTlinux (1)
- Apache (2)
- big-endian (1)
- Blogger (1)
- books (3)
- books links (1)
- Buisness (10)
- C (1)
- C# (5)
- c++ (27)
- car (8)
- Cheat (1)
- CSS (1)
- DLL (1)
- Draw (1)
- Eclipse (2)
- Films (1)
- Firefox (4)
- Flash (1)
- GTK (2)
- GUI (1)
- Home server (1)
- Hotels (1)
- HTML (6)
- IE (1)
- Internet (2)
- Java (1)
- JavaScript (6)
- jQuery (1)
- KDE (1)
- KeeTouch (1)
- Linux (34)
- little-endian (1)
- Makefile (1)
- MFC (6)
- multi-thread (2)
- Music (1)
- ODBC (2)
- OpenBox (2)
- photo (4)
- PHP (38)
- programing (2)
- proxy (1)
- QML (37)
- Qt (41)
- QtCreator (2)
- RegExp (3)
- Shopping (12)
- shutdown (1)
- Soft (1)
- Sound Card (1)
- SQL (1)
- SQL Server (14)
- Subversion (1)
- SVN (1)
- teach (4)
- text-editor (1)
- Travels (1)
- Ubuntu (38)
- Upstart (1)
- Vi (2)
- VirtualBox (2)
- Virtualization (1)
- vkontakte.ru (1)
- Web (2)
- Web-Kit (5)
- WinAPI (7)
- Windows (4)
вторник, 9 октября 2018 г.
четверг, 27 сентября 2018 г.
QML - set default font
If you want set font for all items in ApplicationWindow.
In main.cpp you must configure QFont and set it to QApplication.
Additional info here.
QApplication app(argc, argv);
QFont font;
font.setPixelSize(20);
app.setFont(font);
}
Additional info here.
QtCreator highlight current line
If you want highlight current line in editor
Main menu: Tools > Options > Text Editor > Display > Highlight current line
Main menu: Tools > Options > Text Editor > Display > Highlight current line
QML - SystemPalette visible in all files
If you want use system colors create static variable in special singleton object.
And then use it.
Additional info here.
// Style.qml
pragma Singleton
import QtQuick 2.11
QtObject {
property SystemPalette palette: SystemPalette { colorGroup: SystemPalette.Active }
}
And then use it.
import QtQuick 2.0
Rectangle {
color: Style.palette.highlight
}
Additional info here.
четверг, 30 августа 2018 г.
QtCreator - missing main menu
To open settings window in QtCreator
Additional info here.
- 1. Switch to debug mode
- 2. Right click on 'Name|Value|Type' area
- 3. In menu choose 'Configure debugger'
- 4. Configure hot keys in 'Envioronment' tab
Additional info here.
четверг, 16 августа 2018 г.
Qt - check QObject derived class type
понедельник, 16 июля 2018 г.
QML - nested ListView
Example of using DelegateModel for hierarchical tree of data.
Additional info here.
import QtQuick 2.0
import QtQuick.Controls 2.2
import QtQml.Models 2.3
ListView {
id: view
anchors.fill: parent
focus: true
highlight: Rectangle {
width: view.width; height: view.currentItem.height
y: view.currentItem.y
color: "blue"
}
highlightFollowsCurrentItem: true
model: DelegateModel {
model: catalogTreeModel //common QAbstractItemModel model
delegate: Item {
width: view.width; height: colDlg.height
Column {
id: colDlg
width: view.width
height: itemDlg.height + subView.height
Item {
id: itemDlg
width: view.width
height: childrenRect.height
Text { text: session }
MouseArea {
anchors.fill: parent
propagateComposedEvents: true
onClicked: {
view.currentIndex = index
subView.shown = !subView.shown
} //onClicked:
} //MouseArea
} //Item
ListView { // nested ListView
id: subView
property int parentIndex: index
property bool isParrentSelected: view.currentIndex===index
property bool shown: false
width: view.width; height: shown ? /*_rowsCount * 25*/ subView.count * 25 : 0
visible: shown
enabled: shown
highlight: Rectangle {
id: subHighlight
visible: subView.isParrentSelected
focus: true
color: "red"
} //highlight:
model: DelegateModel {
model: catalogTreeModel
rootIndex: view.model.modelIndex(subView.parentIndex) // change root index for nested branch
delegate: Item {
width: view.width; height: txt.contentHeight
Text { id: txt; text: session }
MouseArea {
anchors.fill: parent
z: 1
hoverEnabled: true
propagateComposedEvents: true
onClicked: {
subView.currentIndex = index
view.currentIndex = subView.parentIndex
} //onClicked:
} //MouseArea
} //delegate:
} //model
} //ListView
} //Column
} //delegate:
} //model:
} //ListView
Additional info here.
Подписаться на:
Сообщения (Atom)