Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.4k Posts
  • no query unable to fetch row

    Solved
    17
    0 Votes
    17 Posts
    5k Views
    M
    I was having a similar issue, but in my case I didn't realize that the QSqlQuery constructor executes the SQL immediately if you pass in the string. That created the "unable to fetch row" condition when I subsequently called .exec since I was erroneously instructing it to run the same query again.
  • Layout: Draw a button widget over the image drawn on the qlabel.

    Solved
    7
    0 Votes
    7 Posts
    690 Views
    M
    @jsulm Thanks so much :) buttonLayout = new QHBoxLayout(ui->label); buttonLayout->addWidget(ui->beginBtn); buttonLayout->addWidget(ui->prevBtn); buttonLayout->addWidget(ui->nextBtn); buttonLayout->addWidget(ui->endBtn); buttonLayout->setAlignment(Qt::AlignBottom | Qt::AlignCenter); However, since the qlabel is adjusted to the size of the image, the location of the button moves according to the size of the image. The button disappears when the picture size is larger than the window and there is a scroll bar. I guess I can fix it so that it is always centered under the window. thank you
  • This topic is deleted!

    Unsolved
    3
    0 Votes
    3 Posts
    33 Views
  • Install Qt for Ubuntu from command line

    Unsolved
    3
    0 Votes
    3 Posts
    478 Views
    SGaistS
    Or use the aqtinstall project.
  • How to embed QDialog into QWidget ?

    Solved
    1
    0 Votes
    1 Posts
    427 Views
    No one has replied
  • Is QModelIndex visible for the user in AbstractItemView?

    Solved
    3
    0 Votes
    3 Posts
    200 Views
    SGaistS
    @JonB AFAIK, that's the easy answer :-)
  • 0 Votes
    14 Posts
    969 Views
    Pl45m4P
    @tushu said in Rectangle in scene is changing it's position after multiple times closing - reopening scene window.: You are right, I am not destroying everything. I am not deleting _scene, after closing scene. I am clearing all the objects in it but not deleting scene. Yes, that's what I wrote here. With your additional movement in negative direction here QRectF Rect(topLeftX /+ 3/, topLeftY /- 20/, bottomRightX /+ 10/, bottomRightY /+ 30/); you expand your scene by 20. And it stays like this as long as you dont destroy your scene. When you add your items again, your items are not centered in your viewport anymore
  • Qt Visual Studio Tools — User Survey

    Solved
    1
    0 Votes
    1 Posts
    110 Views
    No one has replied
  • Custom property for QDataStream?

    Unsolved qdatastream
    8
    0 Votes
    8 Posts
    920 Views
    JonBJ
    @CJha It does seem wasteful to store this "streaming attribute" in your objects' data class. If there are a million objects, why have a million bools in them to tell them what to do if it's all supposed to be the same? Not to mention, what would happen if some objects' boolean said to stream all information and some did not? And you don't want to have to change something inside each object every time you want to stream with or without the "actual data part". That's why it feels like an attribute on the QDataStream rather than on the objects. Maybe you can have a static function on the objects to return your information instead of actual storage in each instance.
  • Help requested to get an old Qt Project up and running

    Solved
    4
    0 Votes
    4 Posts
    293 Views
    M
    So, I was looking where to save the Qt installer on my PC. Found a logical place, and all the installers from the time were there :-). I also had had the sense at the time to list a full set of instructions to get up and running. It works now. I don't know what the actual issue was, but these were the extra steps. Install CMake and Install the Windows 10 SDK. Nothing about a standalone Qt. Strangely, just after compiling the whole PC froze! And all the Qt stuff was in a Virtual Machine. This is worrying as it should only affect the VM. I'll try again when I am not running anything on the main PC. I think this particular issue is solved though. Thanks for listening!
  • I'm looking to create a rich embedded text editor with color highlighting

    Unsolved
    2
    0 Votes
    2 Posts
    152 Views
    JonBJ
    @umen242 Have you looked at QSyntaxHighlighter Class?
  • Checking that a file is a jpeg or png

    Solved
    5
    0 Votes
    5 Posts
    2k Views
    Paul ColbyP
    @Christian-Ehrlicher said in Checking that a file is a jpeg or png: But why not use QMimeDatabase for it? Nice! I didn't know about that one :) Great suggestion.
  • an problem about memset() in Qt

    Solved
    3
    0 Votes
    3 Posts
    682 Views
    J
    well, I change another new dll, it's ok...
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • PyQt6 QImage.convertToFormat converts transparent areas

    Solved
    2
    0 Votes
    2 Posts
    247 Views
    Christian EhrlicherC
    @Captain-Haddock said in PyQt6 QImage.convertToFormat converts transparent areas: How do I prevent transparent areas from being converted? By not converting them to a format which does not support transparency.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • QImage colour depth for reading images

    Unsolved
    3
    0 Votes
    3 Posts
    272 Views
    Kent-DorfmanK
    @Christian-Ehrlicher and a quick experiemtnal proof-of-concept program is worth more than an answer on a forum.
  • QSqlQueryModel incrementally remove old rows

    Solved
    14
    0 Votes
    14 Posts
    945 Views
    SGaistS
    @JonB my bad, I misunderstood your point. We are on the same line :-)
  • QvideoFrame to cv::Mat -> Solved

    Solved
    1
    0 Votes
    1 Posts
    479 Views
    No one has replied
  • QButtonGroup as QtDesigner plugin?

    Unsolved
    5
    0 Votes
    5 Posts
    375 Views
    JonBJ
    @Dariusz Unlike QButtonGroup, QGroupBox is a widget. Do you mean you want to use some customized QGroupBox in Designer? You could Promote or write a Custom Widget Plugin for that?