Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.9k Posts
  • Q_QPA_UPDATE_IDLE_TIME variable issues.

    Unsolved
    1
    0 Votes
    1 Posts
    164 Views
    No one has replied
  • QCanBusDevice not filtering

    Unsolved
    8
    1 Votes
    8 Posts
    723 Views
    ocgltdO
    @Moocow From what I can find in the documentation SocketCAN should support filtering, so still no answer as to why this isn't working. Hopefully someone from Qt will chime in.
  • Change Label on MainWindow not working

    Solved
    7
    0 Votes
    7 Posts
    552 Views
    B
    omfg... it was that simple O_O Thank you very much!!!! :-)
  • Idea how to create professional app

    Unsolved
    5
    0 Votes
    5 Posts
    295 Views
    SGaistS
    Hi, Encapsulation is one of the key here. If you have several widgets for different actions in your application, then create separate widgets and give them a a proper API to interact with the other components of your application. Trying to build and rebuild your UI only functions will make your code hard to reason about and maintain.
  • This topic is deleted!

    Unsolved
    8
    0 Votes
    8 Posts
    29 Views
  • Qt Creator 9.0.1 via Remote Desktop (RDP)

    Unsolved
    8
    0 Votes
    8 Posts
    2k Views
    LorenDBL
    Strange becomes stranger... after disabling the Intel graphics driver, Qt Creator worked, but then I reenabled the Intel graphics driver and Qt Creator continued to start properly over RDP. I'm not sure if this should be considered a final fix, however, as it very well may not survive Windows updates; futhermore, it seems a little hacky to push onto end users as a solution to RDP problems. I will keep an eye on this situation.
  • Problem with QFileDialog and QFileDialog::DontUseNativeDialog

    Solved
    4
    0 Votes
    4 Posts
    452 Views
    JonBJ
    @JonexElectronic If (a) the non-native (i.e. Qt) dialog does not offer preview and (b) the native one either also does not or for some reason you cannot use it, then you would have no choice but to write your own which did offer this "preview" facility.
  • PyQt application has a memory error, how to find it?

    Unsolved
    2
    0 Votes
    2 Posts
    334 Views
    JonBJ
    @freemanl144 From this information alone, if you are unable to reproduce you will not be able to diagnose. Nothing is "impossible", but I suspect it will be "highly unlikely" you will be able to pinpoint.
  • MacBook M1pro Not available QWebEngineView

    Unsolved
    2
    0 Votes
    2 Posts
    230 Views
    J
    my intel MacBook macos Normally, there is no such problem. But there is the above problem on the macos of the M1 chip.
  • QVariant to QList

    Solved c++ model
    13
    0 Votes
    13 Posts
    3k Views
    mzimmersM
    @JoeCFD said in QVariant to QList: Understand. Thiink about you can never be number 1 anymore if you play chess. Oddly enough, that was never a concern of mine.
  • we can use qt creator in ros2 (humble) workspace?

    Unsolved
    5
    0 Votes
    5 Posts
    3k Views
    serkan_trS
    @EmadDeve20 said in we can use qt creator in ros2 (humble) workspace?: hi @SGaist . i was check it but this is so old. i using ros2 humble and my os is ubuntu 22.04. so we have any another choice or not? this is so important for me too use ros2 because my company use ros2 yes you can do this. You can do it without downloading the necessary QT_ROS plugins, it's all a link after all. Which operating system will you try? For linux OS start running Qt creator from terminal and write mandatory commands for ros. Provide rosla communication with the help of Signal Slot
  • How to clear the background of a QOpenGLWidget?

    Unsolved
    11
    0 Votes
    11 Posts
    2k Views
    Chris KawaC
    @SimonSchroeder said: With a transparent background you first need to get a picture from the desktop in the OpenGL drawing area. This is now first set as the background of the OpenGL canvas and only after that you paint on the canvas and draw it on the screen That's not how it works. Each window is drawn to its own buffer with alpha information. A window manager then takes these buffers and composes them in z-order. Depending on the window manager implementation and type of the window it's possible that a GPU readback to the main memory is needed for the composition and that could be what's eating up CPU. In general hardware accelerated transparent surfaces are not very efficient.
  • Sqlite connection weird thing

    Solved
    29
    0 Votes
    29 Posts
    4k Views
    JonBJ
    @masa4 Be aware that the "code" folder simply does not exist at runtime (once you deploy), it is only a thing at design time when inside Qt Creator. And at runtime you do not even know what the "current directory" will be. That is why you need to use absolute rather than relative pathnames, and you might want to look instead at QStandardPaths::StandardLocation to pick and generate a path to a suitable location for your database files.
  • why qprocess not execute mount command correctly ?

    Unsolved
    12
    0 Votes
    12 Posts
    831 Views
    JonBJ
    @jsulm Like I discovered, I think OP must be using the obsoleted QProcess::start(const QString &command, QIODevice::OpenMode mode = ReadWrite). Assuming that is so, there must be a deeper reason why it fails to work, yet to be discovered from OP's future responses....
  • Black and White BMP QImage distort

    Solved
    14
    0 Votes
    14 Posts
    1k Views
    JustSoleSoleJ
    Finally,this problem solved. I checked the QImage::Format enum,found this: QImage::Format_Indexed8: The image is stored using 8-bit indexes into a colormap. Feeling something wrong then i found: QImage::Format_Grayscale8 The image is stored using an 8-bit grayscale format. This format should be what i need,but not Index8. So i tried to convert my unsigned char* img data into QImage by this format, and transmit the formed QByteArray data to server and convert it back to QImage ,and it works!!! The conclusion of create a black and white BMP QImage is use QImage::Format_Grayscale8. And thank you all for your help.Really appreciate!!!
  • QShortcut with QWindow not working

    Unsolved
    1
    0 Votes
    1 Posts
    168 Views
    No one has replied
  • Not able to add horizontal scrollbar to listWidget.

    Unsolved
    4
    0 Votes
    4 Posts
    669 Views
    SGaistS
    Hi, You seem to have a pretty convoluted setup and in fact using widgets to show content in your QListWidget which is a wrong thing to do. If you need special rendering, use a custom QStyledItemDelegate. As a first step, drop the setCellWidget and custom item class. Just fill your cells with your long strings and you should have the effect you want.
  • Embedded TTF does not work in QT5 for Linux GUI application.

    Unsolved
    9
    0 Votes
    9 Posts
    1k Views
    KutyusK
    @LostDeveloper Hi! I have the same problem, please share the solution with us
  • Positioning advice

    Unsolved
    2
    0 Votes
    2 Posts
    182 Views
    M
    Ok let me reply to my own post. I have found that this kind of works if I wrap the bottom row in an Item with Layout.fillWidth: true, set the height to the row height, and then anchor the row to the right of the item. Is the dummy Item the only way to do this? Component { id: teamsListD Rectangle { color: "#000000" height: teamRL.height width: parent.width RowLayout { id: teamRL anchors.left: parent.left width: parent.width Rectangle { width: 10 height: teamCL.height } ColumnLayout { id: teamCL spacing: 20 Layout.fillWidth: true Layout.bottomMargin: 10 Text { Layout.leftMargin: 10 Layout.topMargin: 10 text: "Team 1" color: "#FFFFFF" } Item { height: botRow.height Layout.fillWidth: true Layout.rightMargin: 10 Row { id:botRow spacing: 10 anchors.right: parent.right Image { id: trashI source: "../../images/svg_images/garbage2.svg" height: 20 width: 20 fillMode: Qt.KeepAspectRatio } Image { id: editI source: "../../images/svg_images/edit2.svg" height: 20 width: 20 fillMode: Qt.KeepAspectRatio } } } } } } }
  • Creating and Maintaining dynamic array of QLists - How to?

    Solved
    10
    0 Votes
    10 Posts
    992 Views
    JonBJ
    @JoeCFD Fine and up to you, but then you/beginners will have to do conversions between std:: lists/vectors and Qt ones.