qt5.9

Make a Qt/C++ program show its file types as known on Windows

天大地大妈咪最大 提交于 2019-12-11 17:55:13
问题 Using Qt 5.9 I codded a spreadsheet program and then created an installer for it by Qt Installer Framework (QtIFW2.0.1). Then I sent the program to many of my friends. They installed the app on their Windows machine and now using it, but they have all have a common problem: when they save files of the app, those files are shown as "unknown" files on Desktop. The problem is only with the shape and appearance of the stored files not their functionality, and they are opened by the app if double

Qt:Unable to set Background color for qComboBox properly

时光毁灭记忆、已成空白 提交于 2019-12-11 16:55:38
问题 I have a QCombobox and I want to set a white background color.This is my code. QComboBox *cBox = new QComboBox; cBox->addItem("Text1"); cBox->setStyleSheet("background-color:white"); This combobox has a parent widget whose background is an image and is set as given below: ui->centralWidget->setStyleSheet("border-image:url(./image.png)"); When I set the parent Widget[centralWidget] background as some other color,then the white BG works properly for the combobox.But when I set an image as the

Why is the QScrollArea restricted in size?

血红的双手。 提交于 2019-12-11 14:07:45
问题 To my custom widget, inherited from QWidget , I have added a QScrollArea like this: MainWindow::MainWindow(QWidget *parent) : QWidget(parent)//MainWindow is a QWidget { auto *scrollArea = new QScrollArea(this); auto *widget = new QWidget(this); widget->setStyleSheet("background-color:green"); scrollArea->setWidget(widget); scrollArea->setWidgetResizable(true); scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); QVBoxLayout *parentLayout = new QVBoxLayout(widget); this-

Is this the Minimum Viable TreeView Model in QML?

情到浓时终转凉″ 提交于 2019-12-11 08:48:35
问题 I'm making a folding list of three items: "Hey", "Whats", and "Up?". I want to put it into a tree view. I know this list will only ever contain these three items. Therefore, I would like to know how to "nest" these items together. I know there are implementation for agile systems that support adding and removing parent/child objects, finding indexes... powerful models. However, I literally only need to display these items in an expandable/collapsable view. Here is what I've read through

Qt with android 5.9.0 installation erorr

拈花ヽ惹草 提交于 2019-12-11 04:37:41
问题 I am trying to install Qt with android , but i am facing issues while adding AVD, sdk location : D:\android-sdk ndk location : D:\android\android-ndk-r15c-windows-x86_64\android-ndk-r15c creator showing it found 10 tool chains for this ndk ant location : D:\Apache-ant-1.9.6\src\script\ant.bat whenever i try to start avd manager i am getting a pop message like as below AVD manager tool is not available in the installed SDK tools(version 26.0.2). use the command line tool "avdmanager" for

How to deploy Qt imageformats plugins on Android

六眼飞鱼酱① 提交于 2019-12-11 03:43:02
问题 I'm trying to get image format plugins working on Android. My plan is to build this APNG image format plugin, which closely follows the style of the official Qt extra image format plugins. The answer to my problem will be the same for these too. On desktop (windows) it works. So long as you put the plugin DLL into a imageformats subdirectory like this: myapp/<all my binaries> imageformats/qapng.dll But on Android, it's another story; First idea was to put libqapng.so into libs so that

Why does the border of QWidget cover the contents?

时光总嘲笑我的痴心妄想 提交于 2019-12-10 23:31:18
问题 I have a custom widget derived from QWidget , which has a minimumSize of (30, 30) and a QLabel as a childWidget : MyWidget::MyWidget (QWidget *parent, QPoint p, QWidget *childWidget) : QWidget (parent) { childWidget = this->childWidget; setAttribute (Qt::WA_DeleteOnClose); this->move (p); verticalLayout = new QVBoxLayout (this); if (childWidget != NULL) { childWidget->setParent (this); childWidget->releaseMouse(); childWidget->setAttribute (Qt::WA_TransparentForMouseEvents, true);

How to make QtLinguist shipped with Qt 5.9.1 work?

白昼怎懂夜的黑 提交于 2019-12-10 02:02:08
问题 Goal: Generate/update the *.ts files of a Qt widgets app using lupdate . Setup: Windows 7 Pro 64 (tried on Windows 10 Home as well) Qt 5.9.1 Prebult Components for msvc2017 64-bit, Visual Studio Community 2017. The problem: I have run lupdate from the QtCreator , as well as manually from the console, but in neither case it is working. The message is: Starting external tool "C:\Qt\Qt5.9.1\5.9.1\msvc2017_64\bin\lupdate.exe" C:/Documents/Projects/untitled1/untitled1.pro WARNING: Project ERROR:

How to make QtLinguist shipped with Qt 5.9.1 work?

隐身守侯 提交于 2019-12-05 01:32:08
Goal: Generate/update the *.ts files of a Qt widgets app using lupdate . Setup: Windows 7 Pro 64 (tried on Windows 10 Home as well) Qt 5.9.1 Prebult Components for msvc2017 64-bit, Visual Studio Community 2017. The problem: I have run lupdate from the QtCreator , as well as manually from the console, but in neither case it is working. The message is: Starting external tool "C:\Qt\Qt5.9.1\5.9.1\msvc2017_64\bin\lupdate.exe" C:/Documents/Projects/untitled1/untitled1.pro WARNING: Project ERROR: Cannot run compiler 'cl'. Maybe you forgot to setup the environment? "C:\Qt\Qt5.9.1\5.9.1\msvc2017_64

Include Anaconda python 3.6 in Qt C++ application without Anaconda's Qt version

南笙酒味 提交于 2019-12-01 05:40:02
问题 I want to include Anaconda's Python 3.6 in my Qt C++ application. The reason why is that I want to be able to include a neural network in my C++ application, which is written in Python. I tried to include Python in the following way, which I found online: INCLUDEPATH += /home/[username]/anaconda3/include/python3.6m LIBS += -L/home/[username]/anaconda3/lib/ -lpython3.6m It finds the Python.h header but linking to the Python libraries causes Qt Creator to (apparently) use the Qt libraries of