Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.9k Posts
  • Can't compile with plugin I created

    Unsolved
    4
    0 Votes
    4 Posts
    255 Views
    Christian EhrlicherC
    Just because you create a plugin for the Qt Designer / QtCreator doesn't mean you need the sources (or the library) with the plugins widget.
  • Other view angle in Qt Location OSM Plugin

    Unsolved
    1
    0 Votes
    1 Posts
    137 Views
    No one has replied
  • Installing Qt setup takes too long on files with size around 1k

    1
    0 Votes
    1 Posts
    151 Views
    No one has replied
  • Is there a way of reading the previous value of a QSpinbox?

    Solved
    2
    0 Votes
    2 Posts
    388 Views
    Pl45m4P
    @Dummie1138 said in Is there a way of reading the previous value of a QSpinbox?: I'm wondering whether this function exists If you are talking about something like aboutToChange(int oldVal), unfortunately not (for QSpinBox at least). ContextMenus have an aboutToShow signal before they are shown, but QSpinBox doesn't . As soon as you get your valueChanged signal, the widget itself forgets about the old value, if you haven't saved it.
  • Qt signals/slot QThread > GUI with lambdas functions

    Solved
    3
    0 Votes
    3 Posts
    591 Views
    O
    Oh great, thanks for your answer !
  • How to completely remove Qt Creator under Windows 11?

    Solved
    3
    0 Votes
    3 Posts
    7k Views
    ?
    @jsulm It worked. Thanks.
  • Qt cannot find packages

    Solved
    2
    0 Votes
    2 Posts
    317 Views
    serkan_trS
    @serkan_tr i solved the problem i added to environment variables System Variables -> new -> PKG_CONFIG_PATH -> C:\gstreamer\1.0\msvc_x86_64\lib\gstreamer-1.0\pkgconfig; C:\gstreamer\1.0\msvc_x86_64\lib\pkgconfig
  • how to make frame(s) borders / lines invisible?

    Unsolved
    5
    0 Votes
    5 Posts
    826 Views
    S
    If you nest several widget you might also want to reduce the content margins (at least of some widgets) to 0. When you scroll down in the object properties widgets at the bottom you will find (in red) the settings for the widgets layout. QTabWidget is a little tricky here as you need to make one tab current and then click on the QTabWidget (instead of the single page) to see the layout of the page.
  • class Ui::MainWindow' has no member named 'webView'

    Unsolved
    6
    0 Votes
    6 Posts
    687 Views
    Axel SpoerlA
    Hallo Karl-Heinz, ohne es ganz genau zu wissen: Listen sind in Python integrierte Typen, daher gibt's die QList nicht. Du kannst das Ergebnis von self.w.katTWKategorien.selectedItems() einer Variablen zuweisen und bekommst mit myList[0]das erste Element (wenn es ein solches gibt). LG Axel
  • Popup new window on top of modal

    Solved
    3
    0 Votes
    3 Posts
    340 Views
    M
    @jsulm never mind, i solved it with removing setWindowModality(Qt::ApplicationModal); and adding setWindowFlags(Qt::WindowStaysOnTopHint|Qt::FramelessWindowHint); it. It still works like modal window and its possible to interact with keyboard since i added WindowStaysOnTopHint flag to keyboard too.
  • Button wrong event

    Unsolved
    3
    0 Votes
    3 Posts
    291 Views
    M
    Such call helped me from functools import partial image_import_btn.clicked.connect(partial(display_image, grid_image_detect)) Maybe is more professional call?
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    37 Views
    No one has replied
  • How to upload files in google drive? C++

    Unsolved api google google api google drive c++
    4
    0 Votes
    4 Posts
    2k Views
    SGaistS
    Then the links I posted is what you should read and use.
  • How to create a OpenGL widget in Qt and Visual Studio?

    Unsolved
    6
    0 Votes
    6 Posts
    1k Views
    Chris KawaC
    I wonder if in a opengl widget what will be used is the gpu? It depends on what you do with it. If you just upload the image as a texture and display it as a quad then yes, the work is done mostly by the GPU. If you modify the image and need to re-upload it often then both CPU and GPU will be involved. Widgets are rendered on the CPU, so the load in case of animation is expected, especially if the image is large or the widget is big. Widgets are not generally suited for animations, rather for static UIs. If you're interested in animated UIs you might also want to take a look at QtQuick. It is backed by OpenGL (or Vulkan or Direct3D depending on your platform) but has a easier and higher level declarative syntax.
  • QMake precompiled headers in *.pri files. How?

    Solved
    3
    0 Votes
    3 Posts
    523 Views
    B
    @Chris-Kawa said in QMake precompiled headers in *.pri files. How?: It has nothing to do with CMake or qmake. #pragma once is a compiler extension that replaces include guards i.e. in a standard C++ That's interesting about #pragma once. Never been using it. For the more than 10 years of Qt developing got it from you for the first time. Definetly need to refresh reading of compiler reference. Thanks a lot for explanation. Issue closed.
  • Understanding QPalette

    Solved kde colors qpallete
    7
    0 Votes
    7 Posts
    4k Views
    Axel SpoerlA
    @tim-hilt Can you describe verbally which palette should be changed? The application palette? A specific widget’s palette? Something else? We’ll find it out!
  • How can i store data of database's different categories

    Unsolved
    7
    0 Votes
    7 Posts
    909 Views
    K
    Solved by creating QTableWidget. I transmited data from database in QTableWidget one query in a column and then row by row added data from QTableWidget to QString value to export it later to CSV.
  • Qt6, save TableView record in the database

    Unsolved qt6
    4
    0 Votes
    4 Posts
    381 Views
    Christian EhrlicherC
    @MyNick-0 said in Qt6, save TableView record in the database: How can I consider the data from the model You set data with setData() and retrieve it with data() as you should already know - if not please read the documentation about Qt's model/view framework can you bring the code? I don't write code for others when they don't provide code by themself in the first place so I see that they thought about the problem and tried things out by themself.
  • Problem loading MYSQL/MariaDB Driver in Manjaro Sikaris 22.0

    Solved
    7
    0 Votes
    7 Posts
    1k Views
    supergS
    Well, I just found how to solve this. As stated in the output I posted above, the problem it's basically Qt being unable to find libqsqlmysql.so, but thanks to ChatGPT and google searches I found a workaround: Make sure that you have installed the MySQL client library on your system. You can check if it is installed by running the command locate libmysqlclient.so.21 (in case you are using Linux). Make sure that the MySQL driver library is in a location where your Qt application can find it. You can try adding the directory where the MySQL driver library is located to the LD_LIBRARY_PATH environment variable, by running the command: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/mysql/lib Then, run Qt from terminal. For example, I do it with this command: ~/Qt/Tools/QtCreator/bin/qtcreator Thats it, now it should work. If you don't want to execute the export LD_LIBRARY_PATH=... command everytime before opening Qt, you can set LD_LIBRARY_PATH under environment (Where you add environment variables) . Example: [image: 0219fe83-192b-400b-acbe-db93587f7e35.png] After your default values in LD_LIBRARY_PATH, add ::/path/to/mysql/lib. If you do this, It's not necessary to open Qt from terminal anymore.
  • How to add new widgets between spacers in a QGridLayout?

    Unsolved
    3
    0 Votes
    3 Posts
    1k Views
    K
    @ChrisW67 said in How to add new widgets between spacers in a QGridLayout?: ou are asking the grid layout to add a new widget at the far right (index+1), and that is what it is doing. At index 0 is the left spacer, and at index 1 the right spacer, when I add the first button at index 1, it is added before or after the right spacer? The strange is that only one button gets to the middle. I also tried gridLayout->addWidget(btn, 2, index); and resulted on this: [image: 6d347ba3-c39a-4cfb-8eff-d3896bde3d42.png] I don't think adding a QHBoxLayout at the bottom is necessary for this task.