qt5

Range slider in Qt (two handles in a QSlider) [closed]

房东的猫 提交于 2019-12-17 23:09:37
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . I am using Visual Studio 2010 with Qt 5.0.1 integrated. I need a range selection in QSlider . Is it possible to get two handles? Below is an image illustrating what I need. 回答1: I had the exact same problem. I thought about using the QxtSpanSlider, and although they have beautiful

Image rounded corners in QML

血红的双手。 提交于 2019-12-17 18:28:24
问题 To my surprise, the Image component has no radius property. I tried emulating the rounded corners by putting the image in a rounded Rectangle , but it does not clip the corners. Rectangle { anchors.right: rectContentBg.left anchors.top: rectContentBg.top anchors.margins: 8 radius: 8 width: 64 height: 64 Image { id: imgAuthor opacity: 1 smooth: false anchors.fill: parent source: "qrc:/res/sample_avatar.jpg" } } How can I create an image with rounded corners properly? 回答1: A built-in official

How to show QSqlQueryModel in QML?

半世苍凉 提交于 2019-12-17 13:52:19
问题 I want to show QSqlQueryModel in qml TableView but I don't Wan't to create separate QML file for each new query cause I can't create infinite qml files as given here . Also question is not working for me for dynamic number of columns (could be version difference as I am using 5.11) .I just want something like:- QTableView *view = new QTableView; view->setModel(model); view->show(); in QML. I am new to qml. So far I am able show QSqlQueryModel as guided in first link but my user may enter any

How to show QSqlQueryModel in QML?

帅比萌擦擦* 提交于 2019-12-17 13:51:32
问题 I want to show QSqlQueryModel in qml TableView but I don't Wan't to create separate QML file for each new query cause I can't create infinite qml files as given here . Also question is not working for me for dynamic number of columns (could be version difference as I am using 5.11) .I just want something like:- QTableView *view = new QTableView; view->setModel(model); view->show(); in QML. I am new to qml. So far I am able show QSqlQueryModel as guided in first link but my user may enter any

QMYSQL driver available but not loaded

痞子三分冷 提交于 2019-12-17 11:53:09
问题 How do I load qmysql driver in Qt? I have the following code that produces these results: ("QSQLITE", "QMYSQL", "QMYSQL3") QSqlDatabase: QMYSQL driver not loaded QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 Any suggestions on how to load it? 回答1: We should check our driver first $ cd /opt/Qt5.2.1/5.2.1/gcc_64/plugins/sqldrivers then we can find some files Use the command below to check library $ ldd libqsqlmysql.so if you find the problem libmysqlclient_r.so.16 => not found it may

Exe file does not run without QtCreator

£可爱£侵袭症+ 提交于 2019-12-17 10:49:37
问题 I installed Qt 5.0.1 for Windows 32-bit (MinGW 4.7, 823 MB) Then I created simple Quick 2 application and compiled it. Application is located in the its folder, and apllication run from QtCreator. And I want to run this exe file without QtCreator. To do this, I copy the files from the C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin : Qt5Core.dll icuin49.dll libgcc_s_sjlj-1.dll libwinpthread-1.dll libGLESv2.dll libstdc++-6.dll qminimal.dll Qt5Gui.dll Qt5Network.dll Qt5Qml.dll Qt5Quick.dll Qt5V8.dll

Is there a way to access the image on the QWidget's backing store?

故事扮演 提交于 2019-12-17 09:57:35
问题 I'm doing some compositing inside the paintEvent() in a custom widget. Some of the compositing is done when some areas are already painted, and I need access to the current contents painted so far. So, I'm looking for a way to access the image contents of the current backing store during a paintEvent . I've looked at QBackingStore, but there's nothing there that directly gives me access to the backing store bitmap. Is there some API, perhaps private, that could be used to provide that? If not

How do i use Qt in my Visual Studio 2015 projects?

孤街浪徒 提交于 2019-12-17 06:36:13
问题 We have large project that used .NET Framework for showing forms/windows. Recently i decided to deprecate CLR dependency and move to Qt. While learning Qt, we've migrated from Visual studio 2013 to 2015 and then i noticed that there is no qt support for MSVC 14 version which vs2015 use. Additionally, Qt vs addin was not working jn visual studio express/community edition we use. Is there any chance for me to use Qt and qt addin in our projects? Searching web did not help, and it looks like no

How do i use Qt in my Visual Studio 2015 projects?

青春壹個敷衍的年華 提交于 2019-12-17 06:36:02
问题 We have large project that used .NET Framework for showing forms/windows. Recently i decided to deprecate CLR dependency and move to Qt. While learning Qt, we've migrated from Visual studio 2013 to 2015 and then i noticed that there is no qt support for MSVC 14 version which vs2015 use. Additionally, Qt vs addin was not working jn visual studio express/community edition we use. Is there any chance for me to use Qt and qt addin in our projects? Searching web did not help, and it looks like no

QT5 -- qt creator MinGW编译速度慢

孤人 提交于 2019-12-17 02:55:00
MinGW没有预编译头文件的机制,对每个源代码都需要编译QT的头文件,所以编译慢一些。解决方法: 本人在Ubuntu系统测试使用MinGW比Windows平台要快很多。 所以如果在Windows平台,推荐使用 MSVC编译,秒开。 来源: CSDN 作者: born-in-freedom 链接: https://blog.csdn.net/bornfree5511/article/details/103570195