Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. picture
    Log in to post

    • UNSOLVED Fit image in QGraphicsView and QGraphicsScene
      General and Desktop • qgraphicsview qgraphicsscene picture • • deleted396  

      2
      0
      Votes
      2
      Posts
      1981
      Views

      Hi, You shouldn't use the size of a widget in its own constructor. The widget being not yet visible, the value won't make sense.
    • UNSOLVED Resize A Picture When Print it
      General and Desktop • resize print picture screen capture • • M4RZB4Ni  

      8
      0
      Votes
      8
      Posts
      5340
      Views

      @M4RZB4Ni yes, that is normal. Printer have many more pixels. so image seem smaller. Read docs. they have example of scaling stuff. This sample takes snapshot and scales it. void MainWindow::printshot() { QPixmap pix = QPixmap::grabWindow(QApplication::desktop()->winId()); QPrinter printer(QPrinter::HighResolution); printer.setOrientation(QPrinter::Landscape); QPainter painter; painter.begin(&printer); double xscale = printer.pageRect().width() / double(pix.width()); double yscale = printer.pageRect().height() / double(pix.height()); double scale = qMin(xscale, yscale); painter.translate(printer.paperRect().x() + printer.pageRect().width() / 2, printer.paperRect().y() + printer.pageRect().height() / 2); painter.scale(scale, scale); painter.translate(-width() / 2, -height() / 2); // note uses the form width/height! use pix.h/w if random image painter.drawPixmap(0, 0, pix); painter.end(); }
    • Help with widget
      General and Desktop • widget picture • • silverhawk  

      2
      0
      Votes
      2
      Posts
      728
      Views

      @silverhawk Hi and welcome A picture would help to know what "boxes in the images" means :) you can just upload to postimage.org
    • background picture won't apply to main widget
      General and Desktop • stylesheet widget window background main picture • • Arty.McLabin  

      4
      0
      Votes
      4
      Posts
      1317
      Views

      @Chris-Kawa, you got me wrong i guess, the problem is not stylesheet inheritance, it's about the target widget itself NOT getting the stylesheet, instead that only passing style to children, naming him doesn't affect the result too.