Placing a PNG as the background of a dialog

Post Reply
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Placing a PNG as the background of a dialog

Post by Antonio Linares »

Code: Select all

#include "FiveTouch.ch"

function Main()

   local oDlg, oLabel

   DEFINE DIALOG oDlg ;
      SIZE ScreenWidth(), ScreenHeight()

   oLabel = QLabel( oDlg )
   oLabel:Move( 0, 0 )
   oLabel:Resize( ScreenWidth(), ScreenHeight() )
   oLabel:SetPixmap( QPixmap( DownloadLocation() + "\autobus.png" ):Scaled( ScreenWidth(), ScreenHeight() ) )

   ACTIVATE DIALOG oDlg

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply