qt4

QML animations visible property changes

柔情痞子 提交于 2020-05-25 06:23:12
问题 I want an animation to be painted when an element becomes visible (is should appear smoothly, not the whole at all) I tried this states: State { name: "iconOff" when: iconOnSwitch.checked == false PropertyChanges { target: selectIconRow; visible: false } } transitions: Transition { reversible: true from: "" to: "iconOff" PropertyAnimation { properties: "x,y,visible" easing.type: Easing.InOutQuad from: selectIconRow property: "visible" } } But the selectIconRow still appears immediately How

Remove icon space from QMenu

非 Y 不嫁゛ 提交于 2020-05-08 03:17:07
问题 I'm working on a Qt application (in C++). Without appyling any styles, my menu looks like this: I'd like it to look like this: How do I achieve this? Either using qss, or programmatically? I already tried this, without success: menu->addAction(tr("Add"), this, SLOT(CreateNewWaypoint()))->setIconVisibleInMenu(false); Answers for both Qt4.8 and Qt5 are needed to get the full bounty! 回答1: One way to solve the problem is to use QProxyStyle: customstyle.h #ifndef CUSTOMSTYLE_H #define CUSTOMSTYLE

Remove icon space from QMenu

微笑、不失礼 提交于 2020-05-08 03:15:47
问题 I'm working on a Qt application (in C++). Without appyling any styles, my menu looks like this: I'd like it to look like this: How do I achieve this? Either using qss, or programmatically? I already tried this, without success: menu->addAction(tr("Add"), this, SLOT(CreateNewWaypoint()))->setIconVisibleInMenu(false); Answers for both Qt4.8 and Qt5 are needed to get the full bounty! 回答1: One way to solve the problem is to use QProxyStyle: customstyle.h #ifndef CUSTOMSTYLE_H #define CUSTOMSTYLE

How to detect doubleClick in QTableView

不问归期 提交于 2020-04-10 08:35:59
问题 I'm using PyQt to create a GUI application. In a view inherited from QTableView, need to detect the row the user has selected when they double click a row. The table has sorting, but no editing. How do I do it? Note - tried the doubleClicked(int) signal. It is emitted by mouse buttons, not by data cells, so it was never fired. :( Ian 回答1: I dont understand. The doubleClicked signal of the QTableView has the signature void doubleClicked ( const QModelIndex & index ) If you connect that signal

How to detect doubleClick in QTableView

这一生的挚爱 提交于 2020-04-10 08:35:48
问题 I'm using PyQt to create a GUI application. In a view inherited from QTableView, need to detect the row the user has selected when they double click a row. The table has sorting, but no editing. How do I do it? Note - tried the doubleClicked(int) signal. It is emitted by mouse buttons, not by data cells, so it was never fired. :( Ian 回答1: I dont understand. The doubleClicked signal of the QTableView has the signature void doubleClicked ( const QModelIndex & index ) If you connect that signal

How to integrate QT internationalization to CMake?

淺唱寂寞╮ 提交于 2020-04-08 00:16:14
问题 Greetings all, I am trying to use QT internationalization with CMake. I have configured my cmake file as follows : #Internalization - this should generate core_jp.ts ? SET(rinzo_core_TRANSLATIONS i18n/core_jp.ts ) #these are my source files in the project SET(FILES_TO_TRANSLATE ${rinzo_core_srcs} ${rinzo_core_moh_srcs} ) QT4_CREATE_TRANSLATION(QM_FILES ${FILES_TO_TRANSLATE} ${rinzo_core_TRANSLATIONS}) QT4_ADD_TRANSLATION(QM ${rinzo_core_TRANSLATIONS}) But it doesnt genereate any TS nor QM

How to integrate QT internationalization to CMake?

巧了我就是萌 提交于 2020-04-08 00:15:27
问题 Greetings all, I am trying to use QT internationalization with CMake. I have configured my cmake file as follows : #Internalization - this should generate core_jp.ts ? SET(rinzo_core_TRANSLATIONS i18n/core_jp.ts ) #these are my source files in the project SET(FILES_TO_TRANSLATE ${rinzo_core_srcs} ${rinzo_core_moh_srcs} ) QT4_CREATE_TRANSLATION(QM_FILES ${FILES_TO_TRANSLATE} ${rinzo_core_TRANSLATIONS}) QT4_ADD_TRANSLATION(QM ${rinzo_core_TRANSLATIONS}) But it doesnt genereate any TS nor QM

How to integrate QT internationalization to CMake?

六眼飞鱼酱① 提交于 2020-04-08 00:12:37
问题 Greetings all, I am trying to use QT internationalization with CMake. I have configured my cmake file as follows : #Internalization - this should generate core_jp.ts ? SET(rinzo_core_TRANSLATIONS i18n/core_jp.ts ) #these are my source files in the project SET(FILES_TO_TRANSLATE ${rinzo_core_srcs} ${rinzo_core_moh_srcs} ) QT4_CREATE_TRANSLATION(QM_FILES ${FILES_TO_TRANSLATE} ${rinzo_core_TRANSLATIONS}) QT4_ADD_TRANSLATION(QM ${rinzo_core_TRANSLATIONS}) But it doesnt genereate any TS nor QM

Swipe to delete in QML

我是研究僧i 提交于 2020-03-22 07:48:55
问题 Is it possible to delete items from a ListView in QML like on webOS, i.e. after swiping the entry there's "cancel" and "delete". I'd like to use Qt 4.7 (so QtQuick 1.1) 回答1: There is no default component in QtQuick that can handle gesture signals. There was a Qt labs project that introduced a GestureArea that may do what you want. It was not pacakged with QtQuick 1.1 and I am unsure as to its current status but feel free to give it a try. http://blog.qt.digia.com/blog/2010/10/05/getting-in

Swipe to delete in QML

泄露秘密 提交于 2020-03-22 07:48:05
问题 Is it possible to delete items from a ListView in QML like on webOS, i.e. after swiping the entry there's "cancel" and "delete". I'd like to use Qt 4.7 (so QtQuick 1.1) 回答1: There is no default component in QtQuick that can handle gesture signals. There was a Qt labs project that introduced a GestureArea that may do what you want. It was not pacakged with QtQuick 1.1 and I am unsure as to its current status but feel free to give it a try. http://blog.qt.digia.com/blog/2010/10/05/getting-in